How to get CGPoint of location with google maps sdk for iOS?

后端 未结 2 1998
时光说笑
时光说笑 2021-01-12 22:49

How to get CGPoint of location with google maps sdk for iOS ? I need add pinview on user location.

相关标签:
2条回答
  • 2021-01-12 23:41

    Ok, according to your question do you want to convert the userlocation into the cgpoint, is that.. try use this.

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

    Regards.

    0 讨论(0)
  • 2021-01-12 23:54

    It's basically the opposite of this question, for example:

    GMSMapView* mapView = ...;
    CLLocationCoordinate2D coordinate = ...;
    ...
    CGPoint point = [mapView.projection pointForCoordinate: coordinate];
    
    0 讨论(0)
提交回复
热议问题