将标记放在谷歌地图上的屏幕中央,就像在uber和ola应用程序中一样。当移动或滚动谷歌地图标记时,不应该移动它应该给出latlng坐标
答案 0 :(得分:1)
你需要使用框架布局来对齐你的标记,在这种情况下,像这样的图像在中心。然后使用googleMap.getCameraPosition().target
有关详细信息,请参阅http://developer.android.com/reference/com/google/android/gms/maps/model/CameraPosition.html#target
答案 1 :(得分:0)
试试这个,
javax.servlet.ServletContext.getServletRegistration(Ljava/lang/String;)
答案 2 :(得分:0)
Check Out This
LatLng mapCoordinate = new LatLng(yourLatitude, yourLatitude);
CameraUpdate yourLocation = CameraUpdateFactory.newLatLngZoom(mapCoordinate, 11.0f);
yourMap.animateCamera(yourLocation);
Or In Other way
LatLng mapCoordinate = new LatLng(yourLatitude, yourLatitude);
CameraPosition cameraPosition = new CameraPosition.Builder()
.target(mapCoordinate) // set to Center
.zoom(12.0f) // for the Zoom
.bearing(90) // Orientation of the camera to east
.tilt(30) // Tilt of the camera to 30 degrees
.build(); // Creates a CameraPosition
yourMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));