Move the Map by Keeping the marker in center

前端 未结 2 782
天命终不由人
天命终不由人 2021-01-14 02:25

Whenever I move the map,Marker is also moving with that But I want to move the map by keeping the marker at the center of Map as constant.

How can i acheive this?

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-14 02:47

        CameraPosition cameraPos = new CameraPosition.Builder()
                    .target(new LatLng(Double.parseDouble(currentLAT), Double.parseDouble(currentLNG)))
                    .zoom(10).bearing(0).tilt(0).build();
            mapView.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPos), null);
    

    Set this way:

提交回复
热议问题