0

I am new to google map, i integrated the map into my application. i want to navigate my current location by default. currently i used

 FragmentManager fragmentManager = getFragmentManager();
     mapFragment =  (MapFragment) fragmentManager.findFragmentById(R.id.map);
     googleMap = mapFragment.getMap();
        googleMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);
        googleMap.setMyLocationEnabled(true);

This code shows the navigator button by default, when i clicks that button it goes into my exact location. Will this done by default. Without clicking the navigator button. Please guide me on this. Thanks in advance.

4

1 回答 1

0

你可以试试

googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(coordonnees, 7));
googleMap.animateCamera(CameraUpdateFactory.zoomTo(12), 2000, null);

例如

祝你好运

于 2013-06-12T08:44:35.560 回答