點擊標記事件
點擊標記事件
點擊標記觸發事件,於點擊標記時觸發,程式範例說明如下:
- (BOOL)mapView:(TGMapView *)mapView didTapMarker:(id<TGMarker>)marker {
//點擊Marker時觸發,回傳YES:InfoWindow就不會顯示,NO:InfoWindow就會顯示
NSLog(@"%f-%f",[marker position].latitude,[marker position].longitude);
[mapView_ animateToLocation:[marker position]];
if (marker == canMoveMarker_) {
return YES;
}
return NO;
}