Set Location Center of Map - GMaps v2 - Android -
how set center of map specific location using gmaps v2? how did using gmaps v1:
public void setcenter( latlng point ) { if( point.latitude*1000000 != 0 && point.longitude*1000000 != 0 ) { if( mmapcontroller != null ) { mmapcontroller.setcenter( point ); } /*else if( mopenstreetmapviewcontrollersource != null ) { mopenstreetmapviewcontrollersource.getcontroller().setcenter( new org.osmdroid.util.geopoint( point.getlatitudee6(), point.getlongitudee6() ) ); mpostponedsetcenterpoint = point; }*/ } }
i have looked through api gmaps v2 , can't find , similar functionality. how do this?
you can try:
map.movecamera(cameraupdatefactory.newlatlngzoom(new latlng(latitude, longitude), zoom));
where map
googlemap instance.
Comments
Post a Comment