NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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 ♦

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×535
×74
×26
×23
×3

question asked: 06 Apr '22, 18:44

question was seen: 962 times

last updated: 06 Apr '22, 21:21

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum