It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened,
visit the help center.
Closed 7 years ago.
In my iphone app I am using google map SDK for showing nearby restaurants.I am able to show the places.
I have some doubts..
1. How can I find out the center coordinates of the map ??
2. How to revert back to current position ?
3.How to find out the map is moved- ie center coordinates changed(just like regionChanged delegate in MKMapView)
This should probably be three separate questions, however:
1.
GMSMapView* _mapView = ...;
CLLocationCoordinate2D centre = _mapView.camera.target;
2.
GMSMapView* _mapView = ...;
CLLocationCoordinate2D currentPosition = _mapView.myLocation.coordinate;
CGFloat currentZoom = _mapView.camera.zoom;
GMSCameraPosition* camera =
[GMSCameraPosition cameraWithTarget: currentPosition zoom: currentZoom];
_mapView.camera = camera;
3.
Use the [mapView:didChangeCameraPosition:]
delegate method.