google maps in android -


I am the new user of the Google Maps API in the Android OS. I have made a small application in which I am using Google Maps. I want to add a functionality, when I should double-click on the map (multi-touch) in the map. Is there anyone who has any idea how to do this or if it is possible please provide a code example. thank you in advanced.

BR, muted code

I did something like using a map API Although in the app I did this in an overlay item, the principle should be the same.

You can use the TouchList and gesture detector to detect touch events and touch events.

Note that this is not all the actual working code, you need to adopt it so that it fits in your implementation.

  ... class Expands MyDetector SimpleOnGestureListener {@Override Public Bullion onDoubleTap (MotionEvent event) {mapView.getController () .zoomInFixing ((int) event.getX (), (int ) Event.getY ()); Return super. OntubeTap (}} // Maybe it's in your init or something GestureNector gDetector = new gesture detector (new MyDetector ()); MapView.setOnTouchListener (new on-tailListener) {@ Override Public Boolean On Touch (View V , Motion Avent Event) {Return gDetector.onTouchEvent (event);}});  

Something like this should be done "work" :)


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -