Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $( document ).ready(function() {
- if (navigator.geolocation) {
- navigator.geolocation.getCurrentPosition(function (position) {
- console.log(position);
- var lat = position.coords.latitude;
- var lng = position.coords.longitude;
- axios.get('/nightx/weather', {
- params: {
- lat: lat,
- lng: lng
- }
- }).then(res => {
- console.log(res);
- });
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement