• ResolvedPlugin Contributor hupe13

    (@hupe13)


    Hello,

    I’m including kml files with
    [leaflet-kml src=”/valid/path/to/my.kml” popup_text=”mytext” color=”#FF0000″]

    This doesn’t work with the version 2.8.2:

    VM200:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
    at JSON.parse (<anonymous>)
    at XMLHttpRequest.xhr.onreadystatechange (leaflet-ajax-geojson.js?ver=1.0:25)
    xhr.onreadystatechange @ leaflet-ajax-geojson.js?ver=1.0:25
    XMLHttpRequest.send (async)
    onAdd @ leaflet-ajax-geojson.js?ver=1.0:34
    _layerAdd @ leaflet.js?ver=1.1.0:6
    whenReady @ leaflet.js?ver=1.1.0:6
    addLayer @ leaflet.js?ver=1.1.0:6
    addTo @ leaflet.js?ver=1.1.0:6
    (anonymous) @ (index):408
    Main.init @ construct-leaflet-map.js?ver=1.0:10

    Thank you very much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author bozdoz

    (@bozdoz)

    Could you share the src so that I could look at it?

    Also, could you try out leaflet-kml without any attributes? That is how I test the shortcodes (there is a default src which should work).

    I have tested [leaflet-map][leaflet-kml fitbounds=1] and the default src seems to work just fine.

    View post on imgur.com

    Plugin Author bozdoz

    (@bozdoz)

    I wrote too soon!

    I realized just after I posted that the map is supposed to show a rectangle by default, not the world. So I realized that all of the geojson code must have been executing, instead of the kml, which is why it would read the actual KML files incorrectly.

    Fixed in 2.8.3! Uploading now.

    Plugin Contributor hupe13

    (@hupe13)

    Works now! Thank you very much.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘leaflet-kml broken?’ is closed to new replies.