Android Forums

Go Back   These FORUMS ARE DISABLED!! OUR NEW FORUMS ARE AT http://androidforum.com/ > Android Coders > Android Development, Answers, Tutorials, and Code Snippets
Connect with Facebook

Click Here To Register!
 
 
LinkBack Thread Tools Display Modes
Old 06-30-2010, 02:38 PM   #1
New Member
 
Join Date: Jun 2010
Posts: 4
Friends: 0
View SilentCoder's Profile   View SilentCoder's Photo Album   View SilentCoder's Blog   View Social Groups
Hello,

I am newbie android developers. I am developing an application in which i am using google maps. I have to implement double tap zoom in on google maps. I mean when i double click on a map the map should zoom in. Kindly if it is possible provide a sample code.

BR,
SilentCoders
SilentCoder is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 06-30-2010, 02:47 PM   #2
Administrator
 
Join Date: Jun 2010
Posts: 61
Friends: 5
View Nerm's Profile   View Nerm's Photo Album   View Nerm's Blog   View Social Groups
I cannot provide a sample code as I am not an android developer, however this link may at least point you in the right direction.
Nerm is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 06-30-2010, 04:06 PM   #3
New Member
 
Join Date: Jun 2010
Posts: 4
Friends: 0
View SilentCoder's Profile   View SilentCoder's Photo Album   View SilentCoder's Blog   View Social Groups
I have visited the given link but unable to understand how to implement double tap zoom on google maps.

BR,
SilentCoder is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 06-30-2010, 10:12 PM   #4
New Member
 
Join Date: Jun 2010
Posts: 1
Friends: 0
View random_coder's Profile   View random_coder's Photo Album   View random_coder's Blog   View Social Groups
Hi

You can use the onDoubleTap() method in Gesture Detector to get notification when a double tap happens on the map view.In onDoubleTap() you can set the zoom level as desired.

I hope this helps or you can try to elaborate your problem
random_coder is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 07-01-2010, 01:31 AM   #5
New Member
 
Join Date: Jun 2010
Posts: 4
Friends: 0
View SilentCoder's Profile   View SilentCoder's Photo Album   View SilentCoder's Blog   View Social Groups
Hi

I got your point. But i am really a newbie. I have started this android development few days before. Please if it is possible provide a code example. or check my code and let me know what to do.

Code:
public class Maps extends MapActivity implements OnGestureListener, OnDoubleTapListener{
    
	private GestureDetector detector;
	/** Called when the activity is first created. */
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        //MapViewer mapViewer = new MapViewer(null, null);
        MapView mapView = (MapView) findViewById(R.id.mapview);
        detector = new GestureDetector(this,this);
        mapView.setBuiltInZoomControls(true);
    }

	@Override
	protected boolean isRouteDisplayed() {
		 return false;
	}
	
	public boolean onDoubleTap(MotionEvent e) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean onDoubleTapEvent(MotionEvent e) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean onSingleTapConfirmed(MotionEvent e) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean onDown(MotionEvent e) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
			float velocityY) {
		// TODO Auto-generated method stub
		return false;
	}

	public void onLongPress(MotionEvent e) {
		// TODO Auto-generated method stub
		
	}

	public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
			float distanceY) {
		// TODO Auto-generated method stub
		return false;
	}

	public void onShowPress(MotionEvent e) {
		// TODO Auto-generated method stub
		
	}

	public boolean onSingleTapUp(MotionEvent e) {
		// TODO Auto-generated method stub
		return false;
	}
}
Regards,
SC
SilentCoder is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
Old 07-06-2010, 07:17 AM   #6
New Member
 
Join Date: Jun 2010
Posts: 4
Friends: 0
View SilentCoder's Profile   View SilentCoder's Photo Album   View SilentCoder's Blog   View Social Groups
any suggestion please ???????
I am still having problem.
helpppppppppppppppppp me

Last edited by SilentCoder; 07-06-2010 at 07:20 AM..
SilentCoder is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati
 

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Google maps Jimbob Droid Eris 2 05-31-2010 09:25 PM
Google Maps Question? JerryRecords Droid 2 12-07-2009 04:03 PM
Google maps. CharlieMiddleton Android Chat 5 06-21-2009 06:48 AM
Android Maps has different data to regular Google Maps? Kinslayer Android Games And Applications 5 03-02-2009 01:26 AM
Google MAPs Guruvulu Android Development, Answers, Tutorials, and Code Snippets 0 02-25-2009 09:11 AM


Unlocked G1 Phones | Buy T-Mobile G1 | Google Phone

All times are GMT -6. The time now is 06:25 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright (c) 2012 TalkAndroid.com. All rights reserved.