SHARE
TWEET

Untitled

a guest Jul 18th, 2019 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $( document ).ready(function() {
  2.     if (navigator.geolocation) {
  3.         navigator.geolocation.getCurrentPosition(function (position) {
  4.             console.log(position);
  5.             var lat = position.coords.latitude;
  6.             var lng = position.coords.longitude;
  7.            
  8.             axios.get('/nightx/weather', {
  9.                 lat: lat,
  10.                 lng: lng
  11.             }).then(res => {
  12.                 console.log(res);
  13.             });
  14.         });
  15.     }
  16. });
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
 
Top