You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Always zoom by the center of screen, wherever the point I clicked #4151
Always zoom by the center of screen, wherever the point I clicked
Like below, The map is zoomed always from the middle of the map, no matter where I clicked on the map.
but there are some edge cases as rotate that aren't working as expected and will be more work than I initially anticipated. I'm thinking about picking this up as part of #3276.
I tested this again using the latest in the release-android-v4.1.0 branch (where 4.1.0 Final will be built from) and discovered that the zoom on single tap is now using a scaleBy() call to make the zoom towards where the tap was made but not directly on it. From what I understand the need is for the zoom to happen directly on where the tap was made. @Trinea@tobrun Is this correct?
@bleege this is about altering the focal point of the a gesture. In current implementation we take x,y from the motion event and only support a limited API on MyLocationView for tracking modes:
if (mMapboxMap.getTrackingSettings().isLocationTrackingDisabled()) {
// Zoom in on gesturezoom(true, e.getX(), e.getY());
} else {
// Zoom in on user location viewzoom(true, mMyLocationView.getCenterX(), mMyLocationView.getCenterY());
}
Instead of using user location, we should use a user configurable focal point. I'm going to add more information in the related feature ticket. Going to close this in favour of #4924.
Activity
Trinea commentedon Mar 1, 2016
@jjhurlock
tobrun commentedon Mar 3, 2016
I was able to make it partially work:
but there are some edge cases as rotate that aren't working as expected and will be more work than I initially anticipated. I'm thinking about picking this up as part of #3276.
Trinea commentedon Mar 3, 2016
ok, Thank you very much.
bleege commentedon Jun 6, 2016
I tested this again using the latest in the
release-android-v4.1.0branch (where4.1.0 Finalwill be built from) and discovered that the zoom on single tap is now using ascaleBy()call to make the zoom towards where the tap was made but not directly on it. From what I understand the need is for the zoom to happen directly on where the tap was made. @Trinea @tobrun Is this correct?tobrun commentedon Jun 6, 2016
@bleege this is about altering the focal point of the a gesture. In current implementation we take x,y from the motion event and only support a limited API on MyLocationView for tracking modes:
Instead of using user location, we should use a user configurable focal point. I'm going to add more information in the related feature ticket. Going to close this in favour of #4924.