Forum Replies Created

Viewing 15 replies - 1 through 15 (of 62 total)
  • Thread Starter mygrove

    (@mygrove)

    Unfortunately my hosting service is not willing to update the server. So I have to look elsewhere for an OSM map solution. Thanks for your help.

    Thread Starter mygrove

    (@mygrove)

    An update and another question.

    My hosting provider has suggested moving my site to a different server. However, before doing that I have noticed an additional point.

    My page works in Brave (a Chromium browser) on one pc on my network but not on another machine on the same network with the same browser.

    Uncaught TypeError: Cannot read properties of null (reading 'getElementsByTagName')
        at get (togeojson.js?ver=3.4.1:15:35)
        at Object.kml (togeojson.js?ver=3.4.1:110:30)
        at request.t.onreadystatechange (leaflet-ajax-geojson.min.js?ver=3.4.1:1:561)The one that does not work it throws this error in the console but the one that works, not surprisingly there are no errors at all. How can this be?

    Even more puzzling the page work in Firefox on the machine that does not work in Brave but does not work on the machine where Brave does work (i.e. they are the opposite way around.

    The Firefox error is similar:

    Uncaught TypeError: x is null
        get https://unpkg.com/@mapbox/[email protected]/togeojson.js?ver=3.4.1:15
        kml https://unpkg.com/@mapbox/[email protected]/togeojson.js?ver=3.4.1:110
        onreadystatechange https://edintone.com/wp-content/plugins/leaflet-map/scripts/leaflet-ajax-geojson.min.js?ver=3.4.1:1
    

    How can this be? How to debug it further?

    Thread Starter mygrove

    (@mygrove)

    Thank you, better than I hoped, as I can tweak the HTML too!

    <strong>{name}</strong><br>{description}
    Thread Starter mygrove

    (@mygrove)

    OK, my hosting provider has made some tweaks to the server and the page now works on Firefox but not Chrome, Brave or Edge.

    On the three browsers that don’t work they all throw the same error in the console:

    Uncaught TypeError: Cannot read properties of null (reading 'getElementsByTagName')
    at get (togeojson.js?ver=3.4.1:15:35)
    at Object.kml (togeojson.js?ver=3.4.1:110:30)
    at request.t.onreadystatechange (leaflet-ajax-geojson.min.js?ver=3.4.1:1:561)
    Thread Starter mygrove

    (@mygrove)

    Could you give a hint of the simple CSS to hide the Type Label.

    Thanks.

    Thread Starter mygrove

    (@mygrove)

    Thanks.

    I was thinking it would be useful if all the ‘objects’ that have been added to a map could be presented in an editable table, rather than having to click on each object and edit in the map display.

    |Object ID|Type (marker/line etc. ref only)|marker type|colour|Text|x coord|y coord|Map ID (ref only)|

    Thread Starter mygrove

    (@mygrove)

    It’s not clear what you are suggesting I need to do here. Can you clarify, please.

    Replace my entry in .htaccess or add these two lines?

    AddType application/vnd.google-earth.kml+xml kml
    RewriteRule .*\.kml$ - [L,T=application/vnd.google-earth.kml+xml]
    Thread Starter mygrove

    (@mygrove)

    Well, I have added to my .htaccess file

    AddType application/vnd.google-earth.kml+xml kml

    Cleared the cache, and reloaded the page, but it still has no effect.

    Thread Starter mygrove

    (@mygrove)

    MonsterInsights is off now, but I’m not seeing any difference.

    Thread Starter mygrove

    (@mygrove)

    Here are the errors from the console, it only seems to be pointing towards togeojson.js:

    query-migrate.min.js?ver=3.4.1:2 JQMIGRATE: Migrate is installed, version 3.4.1
    test-kml/:1307 dragging, scroll, mobile  true true false
    test-kml/:1307 0 'enabled'
    togeojson.js?ver=3.4.1:15 Uncaught TypeError: Cannot read properties of null (reading 'getElementsByTagName')
        at get (togeojson.js?ver=3.4.1:15:35)
        at Object.kml (togeojson.js?ver=3.4.1:110:30)
        at request.t.onreadystatechange (leaflet-ajax-geojson.min.js?ver=3.4.1:1:561)
    get @ togeojson.js?ver=3.4.1:15
    kml @ togeojson.js?ver=3.4.1:110
    request.t.onreadystatechange @ leaflet-ajax-geojson.min.js?ver=3.4.1:1
    XMLHttpRequest.send (async)
    onAdd @ leaflet-ajax-geojson.min.js?ver=3.4.1:1
    _layerAdd @ Layer.js:114
    whenReady @ Map.js:1477
    addLayer @ Layer.js:172
    addLayer @ LayerGroup.js:47
    addLayer @ FeatureGroup.js:35
    addTo @ Layer.js:52
    WPLeafletkmlShortcode @ test-kml/:855
    t @ construct-leaflet-map.min.js?ver=3.4.1:1
    init @ construct-leaflet-map.min.js?ver=3.4.1:1
    load (async)
    (anonymous) @ construct-leaflet-map.min.js?ver=3.4.1:1
    (anonymous) @ construct-leaflet-map.min.js?ver=3.4.1:1

    Any further insights appreciated, thanks.

    Thread Starter mygrove

    (@mygrove)

    I deactivated all the other plugins except Leaflet Map and Extensions for Leaflet Map. I also switched to a default Twenty-Twenty-Four theme. Sadly the KML still does not display.

    Thread Starter mygrove

    (@mygrove)

    Like this?

    [leaflet-map fitbounds zoomcontrol scrollwheel]
    [leaflet-kml circleMarker src="https://edintone.com/wp-content/uploads/2024/03/mydata.kml"]

    It’s on the test page now. Unfortunately not.

    • This reply was modified 8 months ago by mygrove.
    Thread Starter mygrove

    (@mygrove)

    Here is a test page https://edintone.com/test-kml/

    All that is on the page are the two shortcodes:

    [leaflet-map fitbounds zoomcontrol scrollwheel]
    [leaflet-kml src="https://edintone.com/wp-content/uploads/2024/03/mydata.kml"]
    • This reply was modified 8 months ago by mygrove.
    Thread Starter mygrove

    (@mygrove)

    Thank you that confirms the path is correct and it does need to be enclosed in quotes.

    However, the KML is still not being rendered over the base map. I know the KML is correct as it works correctly and displays my marker in Google MyMaps.

    Is there anything else that needs to be set in the Leaflet Map plugin?

    Thread Starter mygrove

    (@mygrove)

    Thank you, unfortuantely premium is out of budget for a ‘not for profit’!

Viewing 15 replies - 1 through 15 (of 62 total)