2021年1月21日星期四

MapBox Reverse Geo Encoding

I'm very new to Map box and web development. I have a Lat and long with me which i want to convert it to a address name and store it in a JavaScript variable so that i can use the address name . I tried so hard to find what header file should i add for reverse encoding to work and what JavaScript i should add to achieve my goal. Thanks a lot for you time.

JS

mapboxgl.accessToken = 'pk.eyJ1IjoiZXNxdWlsYXgiLCJhIjoiY2tqd2ZyMJ9.7z7Eyrj3iexJ9uDVYIT0yw';  var map = new mapboxgl.Map({      container: 'map',      style: 'mapbox://styles/mapbox/streets-v11', // stylesheet location       center: [115.83333, -32.01667], // starting position [lng, lat]         zoom: 11// starting zoom            });  var marker = new mapboxgl.Marker({color:"#ff3300",dragable:true,scale:0.8}).setLngLat([115.83333, -32.01667]).addTo(map)  
https://stackoverflow.com/questions/65839516/mapbox-reverse-geo-encoding January 22, 2021 at 12:55PM

没有评论:

发表评论