Ad oggi, non è necessario utilizzare le classi esterne, basta fare i vostri marcatori "trascinabile"
GMSMarker *myMarker = [[GMSMarker alloc] ...];
...
[myMarker setDraggable: YES];
// Use some kind of data to identify each marker, marker does not have 'tag' but 'userData' that is an 'id' type
[myMarker setUserData: markerId];
e attuare il rispettivo delegato
@interface YourController: UIViewController<GMSMapViewDelegate> ...
impostare il proprio delegato
GMSMapView *myMapView = [[GMSMapView alloc] ...];
...
myMapView.delegate = self;
Quindi è possibile gestire ogni evento marcatore, vale a dire:
-(void)mapView:(GMSMapView *)mapView didEndDraggingMarker:(GMSMarker *)marker{
if ([marker.userData isEqualtoString:@"xMark"])
NSLog(@"marker dragged to location: %f,%f", marker.position.latitude, marker.position.longitude);
}
fonte
2014-08-22 17:46:45
soluzioni? Grazie – Mangesh
sì, due e sono entrambi corretti. per favore accettatene uno (robert weindl è bello) quindi questo può essere barrato della lista: D –