Skip to content

Commit

Permalink
Merge pull request #25 from MC-PMOE/patch-1
Browse files Browse the repository at this point in the history
Objektzugriff ermöglichen
  • Loading branch information
skerbis authored Dec 27, 2024
2 parents c81e65b + 7b9979e commit 6b385c0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions assets/geo_osm.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ var rex_geo_osm = function(addressfields, geofields, id, mapbox_token) {

// Karte laden

/*
* Store a reference of the Leaflet map object on the map container,
* so that it could be retrieved from DOM selection.
* https://leafletjs.com/reference-1.3.4.html#map-getcontainer
*/
L.Map.addInitHook(function () {
this.getContainer()._leaflet_map = this;
});

if(mapbox_token=='') {
var map = L.map('map-'+id).setView([current_lat, current_lng], 16);
Expand Down

0 comments on commit 6b385c0

Please sign in to comment.