• I’m using the Leaflet Map plugin to display .KML files on a website I’m working on (by the way, the plug-in works great, thanks!).

    But … The points (markers) in this .KML file have some information in the placemark name field, but the plugin does not show this information when rendering the map with my .KML file.

    Is there anything I could do to show the Placemark Name pop-up when I click on the pin? I’m using this shortcode:

    [leaflet-map width=100% height=500px zoom=12 zoomcontrol=1][leaflet-kml fitbounds=1 src=”‘.get_field(‘tracklog’).'”]

    • This topic was modified 4 years, 6 months ago by mnery.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author bozdoz

    (@bozdoz)

    You might be able to try [leaflet-kml]{placemark} or {name}[/leaflet-kml].

    It really depends on how the kml is parsed, and what the property name is (I can’t tell what “Placemark Name” really is). The kml is parsed by: https://github.com/mapbox/togeojson

    So you might be able to use that on your kml to see what properties are created in the geojson file which is created. Then [leaflet-kml]{property}[/leaflet-kml] should make the markers have that property value as their contents.

    Thread Starter mnery

    (@mnery)

    Thank you! Works perfectly for me.

    [leaflet-map width=100% height=500px zoom=12 zoomcontrol=1][leaflet-kml fitbounds=1 src=”‘.get_field(‘arquivo_tracklog’).'”]{name}[/leaflet-kml]

    Now when I click over a pin the information attached to this point appears.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Display KML Placemak information’ is closed to new replies.