코드를 통해 세계지도를 열고 몇 군데를 표시 할 수있었습니다. 그러나, 나는 도시를 축소해야하는데, 시간이 조금 걸립니다. 특정 도시의지도를 직접 열 수있는 방법이 있습니까?android에서 Google API를 사용하여 특정 도시의지도를 여는 방법
0
A
답변
0
예를 들어 moveCamera을 마지막으로 저장된 위치 (lat, lng 및 zoomLevel)와 함께 사용할 수 있습니다.
final LatLng location = new LatLng(..., ...);// Loaded from SharedPreferences maybe.
// Move the camera to location with a zoom of 15.
map.moveCamera(CameraUpdateFactory.newLatLngZoom(location, 15));
0
당신은 (위도, LNG) 좌표 당신의 도시에 직접지도를 애니메이션이 샘플 코드를 사용하여 자동으로 지정된 수준으로 축소 할 수 있습니다 :이 도움이 될 수
// Set desired lat lng location, and zoom level (for example 10)
CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(new LatLng(locationCity.getLatitude(), locationCity.getLongitude()), 10);
// Move the camera to location
gMap.animateCamera(cameraUpdate);
[보기 변경] (https://developers.google.com/maps/documentation/android/views) – j4rey89