tegarkurniawan

location

Feb 16th, 2017
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
  2. <script type="text/javascript">
  3. navigator.geolocation.getCurrentPosition(showPosition);
  4. function showPosition(position) {
  5. localStorage.setItem('current_latitude',position.coords.latitude);
  6. localStorage.setItem('current_longitude',position.coords.longitude);
  7. }
  8. </script>
Add Comment
Please, Sign In to add comment