google google-maps ios7 drag-and-drop xcode5 google-maps-sdk-ios

google maps - google - ¿Cómo implementar GMSMarker drag drop en GMSMapView?



google maps pod (1)

  1. Configuré el marcador en el mapa de Google, pero cuando lo arrastro, se arrastran todos los mapas.

  2. Quiero arrastrar marcador cuando haga clic y arrastre en su

  3. y arrastre el mapa cuando haga clic y arrastre fuera del marcador.

este es mi código

self.camera = [GMSCameraPosition cameraWithLatitude:-33.86 longitude:151.20 zoom:6 bearing:0 viewingAngle:0]; self.Map = [GMSMapView mapWithFrame:self.MapView.bounds camera:self.camera]; self.Map.myLocationEnabled = YES; self.Map.delegate = self; GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = self.camera.target; marker.draggable = YES; marker.title = @"Sydney"; marker.snippet = @"Australia"; marker.map = self.Map; marker.icon = [GMSMarker markerImageWithColor:[UIColor blueColor]]; marker.appearAnimation = kGMSMarkerAnimationPop; [self.MapView addSubview:self.Map];

y este es un evento en la gota de drag

- (void) mapView:(GMSMapView *)mapView didBeginDraggingMarker:(GMSMarker *)marker { } - (void) mapView:(GMSMapView *)mapView didEndDraggingMarker:(GMSMarker *)marker { } - (void) mapView:(GMSMapView *)mapView didDragMarker:(GMSMarker *)marker { }

cuando ejecuto mi aplicación y depuro todo el evento anterior no funciona. pero el evento haga clic en marcador funciona bien.

¿Cómo implemento drag drop?


Debe presionar y mantener presionado el marcador antes de que comience a arrastrarse. Pensé que tampoco funcionaba hasta que alguien señaló esto ... realmente debe estar en la documentación de Google.