[mapserver-users] (no subject)
Fawcett, David (MNIT)
David.Fawcett at state.mn.us
Fri Oct 11 12:24:44 PDT 2013
Daniel,
If you tweak the layer to output as a map image, do you see any features on the map?
-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Daniel Bolgheroni
Sent: Friday, October 11, 2013 1:45 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] (no subject)
Hi mapserver-users@,
I've set up a mapserver host and I'm trying to get kml format as output, to be used as a feed to Google Maps. I have no problems trying to get images, and actually,I can get a kml, but there is nothing useful in it.
I'm trying to make mapfile.map as simple as possible, to narrow down the problem, with just one shape.
The request I'm using is this:
http://localhost/cgi-bin/mapserv/?map=mapfile.map&mode=map&layer=mg
The mapfile.map I'm using is this:
MAP
NAME "maps"
STATUS ON
SIZE 1920 1080
#SYMBOLSET "../etc/symbols.txt"
EXTENT -180 -90 180 90
UNITS DD
SHAPEPATH "../shp"
IMAGECOLOR 127 0 255
#FONTSET "../etc/fonts.txt"
#KML_INCLUDE_ITEMS "true"
LAYER
NAME "mg"
DATA '../shp/estado_mgPolygon.shp'
STATUS ON
TYPE POLYGON
CLASS
NAME 'Minas Gerais'
STYLE
OUTLINECOLOR 0 0 0
END # STYLE
END # CLASS
END # LAYER
OUTPUTFORMAT
NAME kml
DRIVER "KML"
MIMETYPE "application/vnd.google-earth.kml+xml"
IMAGEMODE RGB
EXTENSION "kml"
FORMATOPTION 'ATTACHMENT=layer.kml' #name of kml file returned
FORMATOPTION "maxfeaturestodraw=100"
END
END # MAP
The 'layer.kml' I get is this:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
<Style id="LayerFolder_check">
<ListStyle>
<listItemType>check</listItemType>
</ListStyle>
</Style>
<Style id="LayerFolder_checkHideChildren">
<ListStyle>
<listItemType>checkHideChildren</listItemType>
</ListStyle>
</Style>
<Style id="LayerFolder_checkOffOnly">
<ListStyle>
<listItemType>checkOffOnly</listItemType>
</ListStyle>
</Style>
<Style id="LayerFolder_radioFolder">
<ListStyle>
<listItemType>radioFolder</listItemType>
</ListStyle>
</Style>
<name>criamaps</name>
<Folder>
<name>mg</name>
<visibility>1</visibility>
<styleUrl>#LayerFolder_check</styleUrl>
</Folder>
</Document>
</kml>
Any hint on what I'm missing is appreciated.
Thank you.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list