I am about to combine more than 1 map. This is kind of sync, but is not particular sync as shown in the following example:


Basically my goal is to get instant permalink from another website in my leaflet map. A good example is the Leaflet Street View plugin:


where through the button you can instantly incorporate the view (under coordinates given) from i.e Google Street View.

Once I incorporated permalink to my website:

Leaflet map with coordinates included in the URL path

I would love to get a link to the same coordinates in another URL permalink likewise: from my leaflet map permalink http://localhost/fl/MDU%20map%20v1.0/#52.28673,0.18075,13z link to the: https://www.suncalc.org/#/52.3929,-1.4583,6/2019.10.18/11:16/1/0 for example suncalc permalink


or Peakfinder permalink.

Analyzing the Leaflet Street View plugin code, I found:

 providers: [
['google', '<b>Street View</b>', 'Google Street View', false,

  onAdd: function(map) {
    this._container = L.DomUtil.create('div', 'leaflet-bar');
    this._buttons = [];

I was trying to do sth like this:

 providers: [
['suncalc','<b>Suncalc</b>', 'Suncalc tool',

but it doesn't work.

Console says:

Uncaught TypeError: b._bounds.contains is not a function at i._update (StreetViewButtons.js:125) at i.onAdd (StreetViewButtons.js:44) at i.addTo (leaflet.js:5) at (index):311

what mostly refers to the LeafletStreetViewbuttons.js

line44: this._update(map.getCenter());

and line 125: show = !b._bounds || b._bounds.contains(center);

One of the working example is here:


where clicking on the MAX value in popup window, you are being redirected to the specified coordinates included in the Peakfinder permalink

Is it possible for leaflet maps?

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.