You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This concerns the calling code of the leaflet directive inside of the link method around line 71. The code calls the setTiles method of the leafletData service. It does not pass the mapId though. So if you have two maps on the page and correctly access them with their respective mapId's it will nevertheless throw an error message if the maps do not define a tile layer in their attributes. I fixed this problem locally. Below the code change:
Before (no mapId passed to setTiles):
// If no layers nor tiles defined, set the default tileLayer
if (!isDefined(attrs.tiles) && (!isDefined(attrs.layers))) {
var tileLayerObj = L.tileLayer(defaults.tileLayer, defaults.tileLayerOptions);
tileLayerObj.addTo(map);
leafletData.setTiles(tileLayerObj);
}
After (mapId passed):
// If no layers nor tiles defined, set the default tileLayer
if (!isDefined(attrs.tiles) && (!isDefined(attrs.layers))) {
var tileLayerObj = L.tileLayer(defaults.tileLayer, defaults.tileLayerOptions);
tileLayerObj.addTo(map);
leafletData.setTiles(tileLayerObj, attrs.id);
}
The text was updated successfully, but these errors were encountered:
This concerns the calling code of the leaflet directive inside of the
link
method around line 71. The code calls thesetTiles
method of theleafletData
service. It does not pass the mapId though. So if you have two maps on the page and correctly access them with their respective mapId's it will nevertheless throw an error message if the maps do not define a tile layer in their attributes. I fixed this problem locally. Below the code change:Before (no mapId passed to setTiles):
After (mapId passed):
The text was updated successfully, but these errors were encountered: