[mapserver-users] mapserver with kml

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Thu Dec 14 01:29:39 PST 2017


Hi,

When you work with WMS the first thing to do is to read the GetCapabilities.
In your case

http://172.17.0.2/?map=/maps/dengue-Rio-de-Janeiro.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

I used version 1.3.0 so that the response will open into the browser automatically.
For KML support you should see a line for KML like here

<GetMap>
<Format>image/png</Format>
<Format>application/vnd.google-earth.kml+xml</Format><Format>
…

Do you have KML in the list?  If you do not, try to add into your metadata
“wms_getmap_formatlist”

It is documented in http://mapserver.org/ogc/wms_server.html.  Did you just guess or is there somewhere wrong documentation about metadata item you have tried
# "wms_format" "image/png")

-Jukka Rahkonen-


However, you must explicitly add KML into WMS outputformats in the metadata. It seems that you have played with it because you have this line commented out:

        # "wms_format" "image/png"




Lähettäjä: mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] Puolesta Ivan Ogasawara
Lähetetty: 14. joulukuuta 2017 2:34
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] mapserver with kml


Dear all,

Anyone knows some tutorial to work with mapserver (wms) and kml?

I am trying to do it .. but with no success.

this is the local url used:

http://172.17.0.2/?map=/maps/dengue-Rio-de-Janeiro.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=RIO_DE_JANEIRO&STYLES=&SRS=epsg:4326&BBOX=-43.7965385309,-23.0828926973,-43.0990394004,-22.7460202858&WIDTH=400&HEIGHT=300&FORMAT=kml.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=RIO_DE_JANEIRO&STYLES=&SRS=epsg:4326&BBOX=-43.7965385309,-23.0828926973,-43.0990394004,-22.7460202858&WIDTH=400&HEIGHT=300&FORMAT=kml

for image/png works fine (tested with leaflet).

Any tips?

Files:
* mapfiles:
  * https://pastebin.com/4EkahMZi
  * https://pastebin.com/DVSt4mmS
* kml: https://pastebin.com/LYkD4ZDL
* Result: https://user-images.githubusercontent.com/5209757/33969313-f7029096-e042-11e7-8621-e8235f0bd5ce.png

Thanks!

My best regards,
Ivan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20171214/193a9e9c/attachment-0001.html>


More information about the mapserver-users mailing list