conveyal / otp.js

OTP Javascript Client & Data Bindings
MIT License
19 stars 20 forks source link

Less agressive zoom/pan #32

Closed abyrd closed 4 years ago

abyrd commented 9 years ago

This is a matter of opinion, but I find the zooming and panning of the map when switching between alternative itineraries to make it harder to read. It is of course necessary at some points in the interaction to guide the user to the right area and keep the bulk of the route within the window, but small adjustments are not necessary. Perhaps a good rule would be to skip the zoom/pan step if the origin, destination, and all transfer points are already inside the viewport.

abyrd commented 9 years ago

I'm also noticing some zooms where part of the itinerary is hidden by interface widgets. It might be best if there were no "floating" widgets at all to obstruct the map interface.

KeizerDev commented 9 years ago

@abyrd Did you find a solution?

abyrd commented 9 years ago

Not yet, contributions are welcome though if you can improve the behavior!

KeizerDev commented 9 years ago

@abyrd I find a solution what fits in my use case. Just made a window.map = map variable in the client.js and thereby I just set window.map.fitBounds = function() {}; in my custom index.js to disable the fitBounds function without getting any errors. Works perfect for me!