How can I handle event when I finished moving camera on google map? I intend to take the last coordinate at the center of the map after I finished looking for locations, then capture the last location that showing at the center of the map.
Thank you.
Yes this can be done by implementing the OnCameraChangeListener in your activity
for example.
public class ABCActivity extends Activity implements OnCameraChangeListener
{
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.actiivty_abc_layout);
}
@Override
public void onCameraChange(CameraPosition position) {
/// Perform all your operations here
}
}
我通过以下链接使用接受的答案成功实现了上述目标: 当用户停止移动相机时,Android google maps v2执行asynctask
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.