Change your current location on Google Maps

I'm trying to set up a blue dot that represents the current location on Google Maps. I am trying to change its color or use a custom image as an icon. form.

I checked

Set the blue dot of Google Maps for your current location

But I also want to include the location, and also I do not place the image exactly on top of the blue dot (although I use the exact coordinates).

I tried to set a circle on top of the Map using

GMSCircle *circ = [GMSCircle circleWithPosition:circleCenter
 radius:50];
 circ.map = mapView_;
 circ.fillColor = [UIColor redColor];

But he is sitting at the blue dot.

+4
source share
2 answers

, UIImageView, MapView. , "didupdatelocation" .

GMSCircle . , . UIImageView .

[myMap addsubview:YourImageView]

.

0

,

 CLLocationDegrees degrees = 90;
 circ.groundAnchor = CGPointMake(0.5, 0.5);
 circ.rotation = degrees;
0

All Articles