Skip to content
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

Zoom centers regarding center of map instead of gesture #1006

Closed
pawelsa opened this issue Aug 31, 2021 · 10 comments
Closed

Zoom centers regarding center of map instead of gesture #1006

pawelsa opened this issue Aug 31, 2021 · 10 comments

Comments

@pawelsa
Copy link

pawelsa commented Aug 31, 2021

I have an issue while zooming where the center of my gesture is not zoomed in. It seems as it is biased by the map center when zooming, the closer the gesture is done to the center the more accurate the zooming is. It may be caused by my configuration. You can see what I mean in the video:

map_zooming_not_correct.mp4

Code used in the video:

Widget build(BuildContext context) {
    return Scaffold(
      body: FlutterMap(
        mapController: _mapController,
        options: MapOptions(
          center: LatLng(51.5, -0.09),
          zoom: 3,
          maxZoom: 5,
          minZoom: 1.5,
          interactiveFlags: InteractiveFlag.drag |
              InteractiveFlag.pinchZoom,
        ),
        layers: [
          TileLayerOptions(
            urlTemplate: "assets/map/{z}/{x}/{y}.png",
            tileProvider: AssetTileProvider(),
          ),
        ],
      ),
    );
  }
@jasonJamEther
Copy link

I have the same issue. Is there are current parameter to zoom from gesture center instead of map center?

@github-actions
Copy link

github-actions bot commented Oct 3, 2021

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Oct 3, 2021
@pawelsa
Copy link
Author

pawelsa commented Oct 4, 2021

This is still an issue

@github-actions
Copy link

github-actions bot commented Nov 4, 2021

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Nov 4, 2021
@Zzerr0r
Copy link
Contributor

Zzerr0r commented Nov 5, 2021

Still an issue

@github-actions github-actions bot removed the Stale label Nov 6, 2021
@Zzerr0r
Copy link
Contributor

Zzerr0r commented Nov 12, 2021

Hey guys i fixed this and made a pull request for it ( #1081) . if you want to, you can fork the repo yourself and integrate the changes i made in the pull request as i don't think this repo is maintained anymore so i dont expect the pull request to be merged into master.
hope i can help anyone who has this problem as well with this

@SlowBroshka
Copy link

SlowBroshka commented Nov 21, 2021

I have same problem ...

i made in the pull request as i don't think this repo is maintained anymore so i dont expect the pull request to be merged into master.

Why it not maintained?

@Zzerr0r
Copy link
Contributor

Zzerr0r commented Nov 25, 2021

@SlowBroshka I don't know why, it just seems that way because the devs dont respond in any issues or solve any pull requests. but as I've said, you can just copy my fork into your repo

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot added the Stale label Dec 26, 2021
@github-actions
Copy link

github-actions bot commented Jan 1, 2022

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as completed Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants