This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

Two PopUps

0

Is there any way to display two PopUps at the same time or even launch a second PopUp from a link ?

This is my code I'm testing, but it shows the first window then quickly disappears.

Any direction or help would be great.

Even a chose between which PopUp: Current Weather or Forecast Weather

var popup = L.popup();

//popup function function onMapClick(e) { popup .setLatLng(e.latlng) .setContent("You clicked the map at " + e.latlng.toString()+ 'Visit Google"') //esample from leaflet, will be immediately replaced by weatherpopup... .openOn(mymap);

//map.on('click', onMapClick);

asked 06 Apr '22, 18:44

UCLABS's gravatar image

UCLABS
11112
accept rate: 0%

edited 06 Apr '22, 21:21

TZorn's gravatar image

TZorn
12.3k764225

2

This looks like a general web development question (albeit using Leaflet), so a more general JS / web development forum might be a better home for the question.

(06 Apr '22, 20:03) SomeoneElse ♦