点击Google地图中的标记时,如何防止相机移动? [英] How to prevent camera from moving when tapping marker in Google Maps?
本文介绍了点击Google地图中的标记时,如何防止相机移动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用iOS版Google Maps SDK.我想防止相机在点击标记时移动.我该怎么做?
I'm using Google Maps SDK for iOS. I want to prevent the camera from moving when I tap a marker. How can I make it?
推荐答案
在viewDidLoad中添加以下代码
Add the following code in your viewDidLoad
- (BOOL) mapView:(GMSMapView *)mapView didTapMarker:(GMSMarker *)marker {
mapView.selectedMarker = marker;
return TRUE;
}
信用
这篇关于点击Google地图中的标记时,如何防止相机移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文