Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. function onMapClick(e) {
  2.  
  3. popup
  4. .setLatLng(e.latlng)
  5. .setContent("You clicked the map at " + e.latlng.toString() + "\n see below for more options...")
  6. .openOn(mymap);
  7. getCords = e.latlng;
  8. document.getElementById('latLonShow').innerHTML = "your latitude and longditude is "+getCords;
  9. document.getElementById('clickEvent').innerHTML = "Would you like to Add this to your saved pins?"
  10. document.getElementById('testBox').innerText= getCords;
  11. }
  12. mymap.on('click', onMapClick);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement