Closed GoogleCodeExporter closed 8 years ago
What version of osmdroid? What version of Android are you targeting and what
version are you running on?
Original comment by kurtzm...@gmail.com
on 1 Aug 2013 at 1:24
Hello,
osmdroid version is 3.0.10, target SDK Version is 17, I'm running on SDK
Version 15.
Currently I'm aiming at disabling the fling-Event because I really don't know
why it jumps randomly from one corner to another (I limited the scroll area).
What I did for now is I extended the MapView class and implemented the
GestureDetector.SimpleOnGestureListener on that class in order to catch the
onFling-Event (it works). Then I call mapView.getScroller().abortAnimation()
but it seems to be ignored. Intercepting the onDown() gesture and aborting the
animation seems to work for "small flings" but when I swipe across the whole
screen onFling animation starts and again the animation "jumps" randomly.
Another way was to intercept touchevents with the dispatchTouchEvent method
from a parent framelayout in which the MapView lies. Here I'm catching the
ACTION_UP event and returning true so that the child MapView doesn't receive
any Touch event. This works well for disabling the fling, but it also disables
other gestures and touch events. So it's not an adequate solution.
Overriding the MapViews MapViewGestureDetectorListener Class onFling-Method
would be really nice.
Original comment by white.wh...@gmail.com
on 1 Aug 2013 at 9:52
What about if you don't limit the scroll area? Does it still cause problems.
Please try to isolate what is different in your application and the sample
application which has a limited scroll area demo that does not exhibit this
behavior for me.
Original comment by kurtzm...@gmail.com
on 1 Aug 2013 at 9:56
Without limited scroll area it's the same behaviour. Can I somewhere get the
sourcecode of the sample application? I didn't find it in the repository.
Beside that I'd like to know how to disable fling. It can't be that
difficult... But I don't get it.
Original comment by white.wh...@gmail.com
on 1 Aug 2013 at 10:13
The source code is available in the project's SVN repository under
trunk/OpenStreetMapViewer
Original comment by kurtzm...@gmail.com
on 2 Aug 2013 at 2:15
Also make sure you have hardware acceleration turned off.
Original comment by kurtzm...@gmail.com
on 2 Aug 2013 at 2:16
Hey, I found a solution that works for me. I still don't know why it crashes
but I disabled the fling successfully. I'm overriding the onTouchEvent from my
extended MapView class and returning true if onFling Gesture occurs (from my
SimpleOnGestureListener).
In my extended MapView Class I only do this:
@Override
public boolean onTouchEvent(MotionEvent event) {
//Call onTouchEvent from the GestureDetector, returns true on fling
if(gd.onTouchEvent(event))
return true;
return super.onTouchEvent(event);
}
Original comment by white.wh...@gmail.com
on 2 Aug 2013 at 7:53
If this fixes your issue then close the ticket, but there is no reason that the
MapView should be displaying this behavior and you shouldn't have to disable
flinging. If you find any more information, please post it here.
Original comment by kurtzm...@gmail.com
on 2 Aug 2013 at 1:48
Hey, sorry I have no Idea how to close tickets, it's my first post here..
Original comment by white.wh...@gmail.com
on 4 Aug 2013 at 1:35
I am closing this ticket but if you have any more information then please post
it here.
Original comment by kurtzm...@gmail.com
on 6 Aug 2013 at 3:26
Original issue reported on code.google.com by
white.wh...@gmail.com
on 1 Aug 2013 at 9:55