This is my marker which is set in - MainAcitivity
googleMap.addMarker(new MarkerOptions()
.position(new LatLng(26.89209, 75.82759))
.title("Store"));
我想要做的是,在listview中,当用户点击txtplace字段时,谷歌标记将集中在我设置的那个标记上
holder.txtPlace.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (holder.txtStore.getText().toString().equals("Store") ) {
//mMap.animateCamera(CameraUpdateFactory.newCameraPosition( what to do here ??? ));
}
}
});
答案 0 :(得分:0)
尝试使用此功能,例如:
googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(26.89209, 75.82759)), 14));