How can I have a smooth animated move between 2 Google Maps locations?

前端 未结 3 1872
梦谈多话
梦谈多话 2021-01-31 17:41

When clicking from one marker to another in Google Maps, the map screen animates the move smoothly if both markers are within them initial map view but jumps if one of the marke

3条回答
  •  旧时难觅i
    2021-01-31 18:29

    For me this method works, but i'm using Google Maps API v2.

    LatLng latLng = new LatLng(lat,lng);
    map.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng, ZOOM_FACTOR));
    

    This animates the camera from current position to the new one.

提交回复
热议问题