// Automatically get the user's location when the page loads window.onload = function() { getLocation(); }; navigator.geolocation.getCurrentPosition(function(position) { // Success logic console.log("Latitude:", position.coords.latitude); console.log("Longitude:", position.coords.longitude); }); function getLocation() { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(function(position) { var lat = position.coords.latitude; var lon = position.coords.longitude; $.ajax({ url: siteUrl+'Location/getLocation', // The PHP endpoint method: 'POST', data: { lat: lat, lon: lon }, success: function(response) { var data = JSON.parse(response); console.log(data); } }); }); } }

ADVERTISEMENT

ADVERTISEMENT

The farm fires helping to fuel India's deadly air

Burning strips the fertility of fields, has a ruinous impact on India's economy and sends plumes of acrid smoke packed with dangerous cancer-causing particles drifting over a densely-populated belt of northern India, including capital New Delhi's 30 million people.

Stock image. / Pexels

Jind, India

Blazing flames light the sky as Indian farmer Ali Sher burns his fields to clear them for new crops, a common but illegal practice that is fuelling deadly pollution killing millions.

Burning strips the fertility of fields, has a ruinous impact on India's economy and sends plumes of acrid smoke packed with dangerous cancer-causing particles drifting over a densely-populated belt of northern India, including capital New Delhi's 30 million people.

This post is for paying subscribers only

SUBSCRIBE NOW

Comments

Related