• Hi, i have a kml that i load from an url:
    The contents is (xml is stripped) :

    The markers show, but how do i get the text in it?

    <?xml version="1.0" encoding="UTF-8"?><kml xmlns="https://www.opengis.net/kml/2.2"><Document><Placemark><name>Vertrekpunt</name><description>IJmeer, Waterland, Noord-Holland</description><Point><coordinates>5.100669,52.415713</coordinates></Point></Placemark><Placemark><name>Eindpunt</name><description>IJmeer, Amsterdam, Noord-Holland</description><Point><coordinates>5.058854,52.383934</coordinates></Point></Placemark><Placemark><name>MarinePlan Boat Route</name><Style><Style id="route"><LineStyle><color>ff0000ff</color><width>4</width></LineStyle></Style></Style><description>Route van IJmeer naar IJmeer op 03-10-2024, 15:41</description><styleUrl>#route</styleUrl><LineString><coordinates>5.100669,52.415713 5.108301,52.405237 5.105556,52.401736 5.103522,52.400169 5.092803,52.396345 5.082075,52.39252 5.071346,52.388695 5.060664,52.384662 5.058854,52.383934</coordinates></LineString></Placemark></Document></kml>
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor hupe13

    (@hupe13)

    Use either

    [leaflet-map fitbounds]
    [leaflet-kml src="https://your-domain.tld/path/to/file.kml"]{name} - {description}[/leaflet-kml]

    or

    [leaflet-map fitbounds]
    [leaflet-kml src="https://your-domain.tld/path/to/file.kml" table-view][/leaflet-kml]
    Thread Starter martinsplinter

    (@martinsplinter)

    Many thanks! The first works, the second one gives some strange errors

    <br /><br>?= props[ key ]; } // rewrite style keys from geojson.io if (rewrite_keys[ key ]) { style[ rewrite_keys[ key ] ] = props[ key ]; } } return L.Util.extend(style, default_style); } function onEachFeature (feature, layer) { var props = feature.properties || {}; var text; if (0) { text = window.WPLeafletMapPlugin.propsToTable(props); } else { text = popup_property ? props[ popup_property ] : window.WPLeafletMapPlugin.template( popup_text, feature.properties ); } if (text) { layer.bindPopup( text ); } } function pointToLayer (feature, latlng) { if (circleMarker) { return L.circleMarker(latlng); } return L.marker(latlng, markerOptions); }}); fillColor=red color=green popup=”true”]

    So i go with the table thingy!

    Plugin Contributor hupe13

    (@hupe13)

    What you are using now? (The translation with deeple I don’t understood.) If there are such errors the kml may be not correct.

    Plugin Contributor hupe13

    (@hupe13)

    <br /><br>

    Maybe this is an error in rendering. Do you have an URL to a test page?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.