- Add: add Isochrone API service.
- Add: add new style parameters to the Static Images API service:
addlayer
,setfilter
, andlayer_id
. - Breaking change:
insertOverlayBeforeLayer
is nowbefore_layer
in the Static Images API service. This change uses the API's name for the field and to support that the field can be used with the new style parameteraddlayer
.
- Fix: add missing
geometry
key to Tilequery service.
- Fix: filter empty waypoints from map matching requests.
- Fix: fix url token placement for service with clients.
- Fix:
Tokens#updateToken
can now setnull
value toreferrers
property to delete the property. - Fix:
Tokens#updateToken
can now setnull
value toresources
property to delete the property. - Breaking change: change all references to
referrer
{s} toallowedUrl
{s}.
- Add: Config for
Tokens#createToken
andTokens#updateToken
can now include thereferrers
property.
- Fix: Fix a CORS-related bug that caused Firefox to send preflight
OPTIONS
requests that were rejected by the server. This bug surfaced in Firefox with the Tilequery API, but may possibly have affected some other endpoints and some other browsers.
- Breaking change & fix: Config for
Static#getStaticImage
now includes aposition
property that can be either"auto"
or an object withcoordinates
,zoom
, etc., properties. This fixes buggy behavior with the"auto"
keyboard by forcing it to be mutually exclusive with all other positioning options. - Fix: Fix bug in
Static#getStaticImage
that resulted in reversed coordinates when creating a polyline overlay. - Fix: Loosen the type validation on coordinates, since longitudes greater than 180 or less than -180 are valid for some APIs.
- Change: Rename
MapMatching#getMatching
toMapMatching#getMatch
. - Change: Throw validation error if request configuration object includes invalid properties. This is a breaking change because it could cause your code to throw a new validation error informing you of a mistake in your code. But there is no change to the library's functionality: you'll just need to clean up invalid properties.
- Add: Add Optimization API service.
- Fix: Include all services in the UMD bundled client. Several were missing.
- Chore: Use
@mapbox/fusspot
for validation; remove the local implementation.
- Fix:
Directions#getDirections
andGeocoding#forwardGeocode
stringify boolean query parameters likesteps
andautocomplete
.
- Brand new codebase. Please read the documentation and try it out! The
mapbox
npm package is now deprecated in favor of the new@mapbox/mapbox-sdk
.