Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/google-maps/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何从谷歌地图上的gms标记获取地址?_Ios_Google Maps_Gmsmapview - Fatal编程技术网

Ios 如何从谷歌地图上的gms标记获取地址?

Ios 如何从谷歌地图上的gms标记获取地址?,ios,google-maps,gmsmapview,Ios,Google Maps,Gmsmapview,如何使用此方法获取经纬度 - (void)mapView:(GMSMapView )mapView didEndDraggingMarker:(GMSMarker )marker; 我想在调用DiEndDraggingMarker时获取地址。您可以从标记位置获取纬度和经度。使用反向地理编码获取位置的地址 - (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate {

如何使用此方法获取经纬度

- (void)mapView:(GMSMapView )mapView didEndDraggingMarker:(GMSMarker )marker;

我想在调用DiEndDraggingMarker时获取地址。

您可以从
标记位置获取
纬度
经度
。使用反向地理编码获取位置的地址

- (void)mapView:(GMSMapView *)mapView didTapAtCoordinate:(CLLocationCoordinate2D)coordinate {
    NSLog(@"You tapped at %f,%f", coordinate.latitude, coordinate.longitude);
}
- (void) mapView:(GMSMapView *)mapView didLongPressAtCoordinate:(CLLocationCoordinate2D)coordinate{
    NSLog(@"tapped");
}

- (void) mapView:(GMSMapView *)mapView didBeginDraggingMarker:(GMSMarker *)marker{
     isDragging = YES;
    NSLog(@"didBeginDraggingMarker:");
}

- (void)mapView:(GMSMapView *)mapView didEndDraggingMarker:(GMSMarker *)marker{
    isDragging = NO;
    NSLog(@"marker dragged to location: %f,%f", marker.position.latitude, marker.position.longitude);

    NSLog(@"didEndDraggingMarker");

}