Skip to main content

New answers tagged

2 votes
Accepted

Initializing a map container only if it is not already initialized in Leaflet

There is no workaround here without created map objects being saved. Even if you would get container of the already created map, you are still missing map object to add marker to it. Simple solution ...
TomazicM's user avatar
  • 26.3k
0 votes

imageOverlay is not working with Leaflet side-by-side

Resonating with @TomazicM, replacing every occurrence of this._leftLayer.getContainer() statement with this._leftLayer.getPane() statement did fix my issue. In my case I've tried accessing two raster ...
Nimesh Bhandari's user avatar
2 votes
Accepted

Adding secured WMS layer to Leaflet JS

If it is plain Basic Authentication you can use the leaflet-wms-header plugin and set the Authorization header as base64 encoded string like UserName:Password using the btoa method. Something like: ...
Bernd Loigge's user avatar
  • 2,940

Top 50 recent answers are included