Open mikima opened 6 years ago
I think this has to do with how blocks and p5.js manage global variables. myMap is not defined in the global scope and p5 expects it to be. can you try running this in a local editor?
Yes tried in local, same problem.
It's strange since myMap is accessible in the mouseReleased()
. Could it be related to the fact I'm using MapboxGL?
There's a typo in the documentation it should be pixelToLatLng
instead of pixelToLatlng
Just update that naming and it should work
I'm glad I found this. I appreciate your work! Do you mind updating the documentation on mappa.js.org to reflect this?
Sorry for the continuous posting of issues.
When i try to use the
pixelToLatlng()
function i get this error:Here an example using it. If you open the console and click on the map you should see the error.