0

I'm using Leaflet to show some info for points:

var m1 = L.marker([20, 90], {icon: picture}).addTo(mymap);
m1.bindPopup('<h1 class="center">Caption</h1> <br><b>Info: </b>bla').openPopup();

How can you avoid that one popup is always opened when opening the HTML document?

1 Answer 1

5

Simply remove the call of .openPopup() on your marker:

var m1 = L.marker([20, 90], {icon: picture}).addTo(mymap);
m1.bindPopup('<h1 class="center">Caption</h1> <br><b>Info: </b>bla');
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.