Skip to content
This repository has been 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

Closed
Trinea opened this issue Mar 1, 2016 · 5 comments
Closed

Always zoom by the center of screen, wherever the point I clicked #4151

Trinea opened this issue Mar 1, 2016 · 5 comments
Labels
Android Mapbox Maps SDK for Android feature

Comments

@Trinea
Copy link

Trinea commented Mar 1, 2016

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.

@Trinea
Copy link
Author

Trinea commented Mar 1, 2016

@jjhurlock

@tobrun
Copy link
Member

tobrun commented 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
Copy link
Author

Trinea commented Mar 3, 2016

ok, Thank you very much.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Mar 6, 2016
@tobrun tobrun added this to the android-v4.1.0 milestone Mar 6, 2016
@bleege bleege modified the milestone: android-v4.1.0 Mar 18, 2016
@tobrun tobrun mentioned this issue Mar 19, 2016
12 tasks
@bleege
Copy link
Contributor

bleege commented Jun 6, 2016

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?

20160606-4-1-test

@tobrun
Copy link
Member

tobrun commented 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:

if (mMapboxMap.getTrackingSettings().isLocationTrackingDisabled()) {
        // Zoom in on gesture
        zoom(true, e.getX(), e.getY());
} else {
        // Zoom in on user location view
        zoom(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.

@tobrun tobrun closed this as completed Jun 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android feature
Projects
None yet
Development

No branches or pull requests

5 participants