How to get CGPoint locations with Google Maps SDK for iOS?

How to get CGPoint locations using Google Maps sdk for iOS? I need to add pinview to user location.

+5
source share
2 answers

This is basically the opposite of this question , for example:

GMSMapView* mapView = ...;
CLLocationCoordinate2D coordinate = ...;
...
CGPoint point = [mapView.projection pointForCoordinate: coordinate];
+17
source

Ok, for your question, you want to convert userlocation to cgpoint, here's what .. try using this.

CGPoint newCenter = [self.map convertCoordinate:coord toPointToView:self.map];

Sincerely.

0
source

All Articles