Error map.openPopup is not a function
-
Hi,
I'm new here, I'm testing free api because the service seems to be very interesting but I want to be sure Windy will fit all my business requirements. I've just tryed to reproduce this tutorial https://api.windy.com/map-forecast/examples/hello-world but when I call openOn function an error occured: Uncaught TypeError: map.openPopup is not a function. I already use Leaflet map in another scenario into my website and I do not have this error. I'm able to open popup, add marker, layers and so on. Is this a problem related to free api key I'm using or there could be something I do wrong? Thanks -
@flimuti Hello, this post may help you - https://community.windy.com/topic/12109/how-to-show-temperature-instead-of-wind-when-loading-a-map?_=1612947579826
-
@korina Hi, sorry but I don't understand how the post you suggested can help me. My code is the same as the tutorial but the error I mentioned in ther previous post occurs.
Here is my js code:var options = { key: '**MY KEY**', verbose: true, lat: 50.4, lon: 14.3, zoom: 5, }; windyInit(options, function (windyAPI) { vm.map = windyAPI; L.popup() .setLatLng([50.4, 14.3]) .setContent('<p>Hello world!<br />This is a nice popup.</p>') .openOn(vm.map); });