Convert coordinates to a place name using angular and mapbox

  angular, mapbox

Im using mapbox and angular. Am gonna ask how to convert coordinates to place name. When geolocate triggered.

   this.map.on('load', function () {
  geolocate.trigger();
});

geolocate.on('geolocate', locateUser);
function locateUser(e,) {
  console.log('A geolocate event has occurred.');
  console.log("lng:" + e.coords.longitude)
  console.log("lat:" + e.coords.latitude)
  geolocate.off('geolocate', null);
}

Source: Angular Questions

One Reply to “Convert coordinates to a place name using angular and mapbox”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.