4

I am trying to customize blue dot which represents current location in Google Maps. I am trying to change its color or use custom image as icon. image.

I checked

Customize Google Maps blue dot for current location

But i want to enable location as well and also i does not fit image exactly on top of blue dot (though i use exact coordinates).

I tried to put circle on top of Map using

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

But it sits behind blue dot.

Community
  • 1
  • 1
Mann
  • 5,477
  • 6
  • 45
  • 57

2 Answers2

0

Me too faced same problem and I've used UIImageView, placing it's center at user location and added it to MapView. Also I am changing its center in "didupdatelocation" delegate method everytime with some animation.

GMSCircle will add inside map. I guess thats why its not worked. You need to add UIImageView on top of map say

[myMap addsubview:YourImageView]

It's working fine for me.

Satish A
  • 584
  • 4
  • 17
-1

Please use this

 CLLocationDegrees degrees = 90;
 circ.groundAnchor = CGPointMake(0.5, 0.5);
 circ.rotation = degrees;
Neenu
  • 6,848
  • 2
  • 28
  • 54