我正在使用 Mapbox Geocoder API 来搜索地址:
https://api.mapbox.com/geocoding/v5/mapbox.places/${this.searchKeyword}.json?country=us&access_token=${this.accessToken}
它工作得很好,但我希望它搜索靠近我用户当前位置的地址(我有 lat long)。现在它给了我在国家另一边的结果。
所以像
https://api.mapbox.com/geocoding/v5/mapbox.places/${this.searchKeyword}.json?country=us&access_token=${this.accessToken}&near=123.456, 121.654