mygrove
Forum Replies Created
-
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingUnfortunately 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.
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingAn 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?
Forum: Plugins
In reply to: [Leaflet Map] How to display two properties from a KMLThank you, better than I hoped, as I can tweak the HTML too!
<strong>{name}</strong><br>{description}
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingOK, 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)Forum: Plugins
In reply to: [Waymark] Issues using KML filesCould you give a hint of the simple CSS to hide the Type Label.
Thanks.
Forum: Plugins
In reply to: [Waymark] Issues using KML filesThanks.
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)|
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingIt’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]Forum: Plugins
In reply to: [Leaflet Map] KML options not workingWell, 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.
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingMonsterInsights is off now, but I’m not seeing any difference.
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingHere 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.
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingI 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.
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingLike 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.
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingHere 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.
Forum: Plugins
In reply to: [Leaflet Map] KML options not workingThank 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?
Thank you, unfortuantely premium is out of budget for a ‘not for profit’!