a guest Jan 24th, 2020 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function onMapClick(e) {
  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);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand