mapbox / mapbox-gl-geocoder

Geocoder control for mapbox-gl-js using Mapbox Geocoding API
https://mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder/
ISC License
368 stars 180 forks source link

Fix flyTo coordinates not set when selected.center is not defined #416

Closed thaddmt closed 3 years ago

thaddmt commented 3 years ago

Currently when selected.center is not defined the flyTo action will just zoom in on the currently viewed area. Fixed this to be similar to how selected.center and selected.geometry.coordinates are handled in _handleMarker so that either can be used as the flyTo destination.

thaddmt commented 3 years ago

Looks good to me.

@andrewharvey Is there any way I can help to push this through? Looks like the travis CI build failed due to not ok - Cannot create a client without an access token. Is that a setting that I'm missing or is it in the travis CI build?

andrewharvey commented 3 years ago

CI will fail for external contributors because the access token isn't set there, but should pass locally.