-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FlyTo speed geocoder result #51
Comments
That was a bit of an oversight on my part. As an interim solution you can set var geocoder = new mapboxgl.Geocoder({
flyTo: false
});
geocoder.on('result', function(e) {
var result = e.result;
map.flyTo({
// Pass result and custom animation
});
}); |
@tristen Thanks for the reply, seems to work now. Only problem that I have now is that with the standard geocoder it zooms further if the address is more specific. How should I add this to the custom animation? Do you have any suggestions for this. |
Well this is travelling further down a rabbit hole but you can infer from the source code that it actually fits to bounds if the address is less specific and zooms to fixed zoom if it's more specific. |
@tristen Great, thanks for the help. |
Oh! we should keep this open. I think we should totally pass |
Agreed, for my use case it would nice to reset the pitch to 0 by simply passing it as an option to flyTo rather than rolling my own on result event handler. |
This would be great — there's a lot moving in the Mapbox GL Camera API right now (mapbox/mapbox-gl-js#2801); we should do this after that lands (as it is, mapbox-gl-geocoder uses different camera methods depending on the result). |
With #214 in mind, slated for v4. I think we should try to decide if those flyTo options are also applied when fitting the map to a geocode bbox. mapbox-gl-geocoder uses |
👍 didn't realize these properties were available on the fitBounds method was well. I think we should pass any custom camera/animation options to the fitBounds calls as well. |
Just a quick question, is it possible to adjust the flyto speed of the geocoder since the FlyTo option is a boolean.
The text was updated successfully, but these errors were encountered: