native zoom and scroll
Posted: Fri Feb 21, 2014 1:10 pm
Hi there, I'm hoping someone can help with this.
I'm trying to make an app which has the option to look at a map of a local area. I want the user to be able to zoom and scroll round the map using touch swipe and pinch zoom gestures.
I can use a native scroller to scroll around the map, but it doesn't seem to support zooming.
I have used a more manual method of tracking touches to zoom and scroll, but it's very complicated and the algebra isn't quite right. I've set a limit to the amount you can zoom in, but once you reach that limit if you carry on trying to zoom, while it keeps the same zoom level it quickly tracks to the bottom right of the map. Also using this method you don't get the continuation of movement if you swipe to scroll and let go, it stops as soon as the touch stops.
Is there a 'proper' way to do this. It seems to me like one of the most basic things you'd want to be able to do with a mobile app.
Thanks.
I'm trying to make an app which has the option to look at a map of a local area. I want the user to be able to zoom and scroll round the map using touch swipe and pinch zoom gestures.
I can use a native scroller to scroll around the map, but it doesn't seem to support zooming.
I have used a more manual method of tracking touches to zoom and scroll, but it's very complicated and the algebra isn't quite right. I've set a limit to the amount you can zoom in, but once you reach that limit if you carry on trying to zoom, while it keeps the same zoom level it quickly tracks to the bottom right of the map. Also using this method you don't get the continuation of movement if you swipe to scroll and let go, it stops as soon as the touch stops.
Is there a 'proper' way to do this. It seems to me like one of the most basic things you'd want to be able to do with a mobile app.
Thanks.