mapbox / mapbox-sdk-js

A JavaScript client to Mapbox services, supporting Node, browsers, and React Native
Other
717 stars 186 forks source link

Forward Geocoder: Unable to set 'proximity' param to 'ip' as described in the documentation. #466

Closed zholmes1 closed 1 year ago

zholmes1 commented 1 year ago

In the documentation at https://docs.mapbox.com/api/search/geocoding/, it says you can send 'ip' as a stand-in for the proximity coordinates to attempt to gather location via IP. This is not possible in the TS SDK as it forces you to give coordinates.

I've already switched away from the SDK to just hitting the Mapbox endpoint with Axios so I can have more control over stuff like this. But I thought I'd let you know.

andrewharvey commented 1 year ago

This was added in https://github.com/mapbox/mapbox-sdk-js/pull/434 for version 0.13.0, so if it's not working a reporducable example would be helpful. TypeScript isn't directly supported see https://github.com/mapbox/mapbox-sdk-js/issues/213 so it might be an issue with 3rd party TypeScript support.