@Override
public void onMapReady(GoogleMap googleMap) {
mMap = googleMap;
if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
return;
}
mMap.setMyLocationEnabled(true);
LatLng bangalore = new LatLng(12.9667, 77.5667);
mMap.addMarker(new MarkerOptions().position(bangalore).title("Bengaluru"));
float zoomLevel = 12;
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(bangalore, zoomLevel));
}
代碼縮放到班加羅爾地區,但我需要爲我的當前位置我怎麼能直接放大到Android應用我的當前位置映射
得到您的當前位置,並把變焦代碼,在該代碼你給LAT長班加羅爾這就是爲什麼它顯示在爲我工作班加羅爾 –