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

Massimo Variolo
  • 4,669
  • 6
  • 38
  • 64
  • Are you implementing it with something like [this](http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2-part-6-implementing-the-pinch-zoom-gesture/1847) ? – Kgrover Mar 25 '13 at 23:56
  • Not sure if you see [flickering as well](https://code.google.com/p/osmdroid/issues/detail?id=320&can=1&q=pinch%20to%20zoom). – Kgrover Mar 25 '13 at 23:58
  • @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. – Zala Janaksinh Apr 09 '13 at 04:27

1 Answers1

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.

kurtzmarc
  • 3,110
  • 1
  • 24
  • 40
  • please, can you provide the links about that? I only found 3.0.9 and tested it: no pinch between fingers. – Massimo Variolo Apr 12 '13 at 07:13
  • 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](http://www.osmdroid.org). We will probably push a new release soon. – kurtzmarc Apr 12 '13 at 12:19
  • @kurtzmarc 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. – David Doria Aug 27 '13 at 12:45
  • 1
    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. – kurtzmarc Aug 27 '13 at 13:46
  • @kurtzmarc 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? – David Doria Aug 27 '13 at 14:12
  • 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](https://code.google.com/p/osmdroid/issues/detail?id=460) for progress on implementing in-between/floating point zoom levels. – kurtzmarc Aug 27 '13 at 14:41