Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
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

Closed

Description

@Trinea

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.

Activity

  1. Trinea commented on Mar 1, 2016

    @Trinea
    Author
  2. tobrun commented on Mar 3, 2016

    @tobrun
    Member

    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.

  3. Trinea commented on Mar 3, 2016

    @Trinea
    Author

    ok, Thank you very much.

  4. added
    Android
    on Mar 6, 2016
  5. added this to the android-v4.1.0 milestone on Mar 6, 2016
  6. modified the milestone: android-v4.1.0 on Mar 18, 2016
  7. bleege commented on Jun 6, 2016

    @bleege
    Contributor

    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

  8. tobrun commented on Jun 6, 2016

    @tobrun
    Member

    @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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidfeature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions