Osmdroid and Pinch
Asked Answered
D

1

5

I'm developing an app using osmdroid (3.0.8). When I zoom using two fingers in and out, the zoom starts from the center of the map, not from the middle of the two fingers (using MapView.setMultiTouchControls(true);). I've tried to implement the pinch (pinch) but with bad results. I've read other similar questions but without finding a good solution.

Note: I MUST use OSM, and not other solutions

Deepen answered 25/3, 2013 at 22:33 Comment(3)
Are you implementing it with something like this ?Schweitzer
Not sure if you see flickering as well.Schweitzer
@Sam i also use the osmdroid.but after use this i got this type error in every time.Unfortunately,System UI has Stopped.i can't remove the app from device.means device has been hang.Shemikashemite
I
2

Osmdroid 3.0.10 includes support for zooming at the location you pinched at.

The samples also include a two-finger rotation gesture overlay if that is something you are interested in trying.

Iowa answered 12/4, 2013 at 2:7 Comment(6)
please, can you provide the links about that? I only found 3.0.9 and tested it: no pinch between fingers.Deepen
There is no 3.0.10 release yet so you will have to build from source. Source can be found on the osmdroid google code page www.osmdroid.com. We will probably push a new release soon.Iowa
@Iowa Was this included in the 3.0.10 release? That is what I am using, and the pinch zoom behavior seems to still zoom relative to the center of the map.Highstrung
It was included in the 3.0.10 release and I just checked the sample app and when I pinch the corner of the map it zooms from the pinch point as intended not the center.Iowa
@Iowa The issue I am trying to address is when I pinch to zoom everything goes well until I release the pinch. At that point, the map moves a bit. When you release your fingers, does the map stay still?Highstrung
Note that as you pinch you are "in-between" zoom levels. So when you release, it will snap-to the closest zoom level. See Issue 460 for progress on implementing in-between/floating point zoom levels.Iowa

© 2022 - 2024 — McMap. All rights reserved.