1
0
Fork 0
mirror of synced 2024-07-09 00:06:05 +12:00

Merge pull request #9876 from Budibase/fix/embedded-map-init-error-handling

Added error handling for leaflet initialisation errors
This commit is contained in:
deanhannigan 2023-03-07 09:35:06 +00:00 committed by GitHub
commit 82397dc516

View file

@ -283,6 +283,8 @@
if (mapInstance) {
mapInstance.remove()
}
try {
mapInstance = L.map(embeddedMapId, mapOptions)
mapMarkerGroup.addTo(mapInstance)
candidateMarkerGroup.addTo(mapInstance)
@ -304,6 +306,9 @@
// Reset view
resetView()
} catch (e) {
console.log("There was a problem with the map", e)
}
}
const handleMapClick = e => {