[mapserver-users] (no subject)
Daniel Bolgheroni
daniel at cria.org.br
Fri Oct 11 11:45:04 PDT 2013
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.
More information about the MapServer-users
mailing list