我的應用顯示用戶的驅動路線。幾秒鐘後,地圖將停止加載新的內容,看起來像這樣: Android的谷歌地圖V2犯規刷新
我的代碼: XML
<fragment
xmlns:android="http://schemas.android.com/apk/res/android"
class="com.google.android.gms.maps.SupportMapFragment"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
map:cameraZoom="19"
android:layout_below="@+id/tracking_maps_colorgradient">
</fragment>
的Java:
float zoom = 18;//googleMap.getCameraPosition().zoom;
LatLng latLng = new LatLng(lastLatitude, lastLongitude);
locations.add(latLng);
CameraPosition pos = new CameraPosition.Builder()
.target(latLng)
.bearing(bearing)
.zoom(zoom)
.tilt(googleMap.getCameraPosition().tilt)
.build();
googleMap.animateCamera(CameraUpdateFactory.newCameraPosition(pos));
Polyline p = googleMap.addPolyline(new PolylineOptions()
.add(latLng)
.width(15)
.color(Color.RED)
.geodesic(true));
p.setPoints(locations);
有沒有辦法使無效地圖?
感謝您的幫助!
沒有人的想法?我還在掛在這個問題... – iTamp