Open alexandermorgan opened 4 years ago
We could probably improve this but it touches on this at https://github.com/mapbox/mapbox-sdk-js#creating-clients it also comes down to your style preference how you want to name the variables but for example:
const MapboxGeocoder = require('@mapbox/mapbox-sdk/services/geocoding');
const geocoder = MapboxGeocoder({ accessToken: MY_ACCESS_TOKEN });
then geocoder.reserveGeocode
@andrewharvey Friendly suggestion to move this to the actual doc pages. This added an extra 5 min for me too.
Docs issue: The documentation examples for the geocoding service look great but it's unclear how to import/instantiate the
geocodingClient
object that all of the examples use. For example, with the reverse geocoding example:... where do you get the
geocodingClient
object?