4

I use Google Map in my ios app and I like to show the location animation used in the Google Map.That animation is normally used for displaying the current location and is auto-resizing, i.e. the marker size is animated like self growing in light blue colour. I like to display that animation for my latitude and longitude positon. How can I program it? I don't have enough reputation to upload image. Thanks

Bryanyan
  • 677
  • 3
  • 13
  • 30

2 Answers2

0

You should be able to just set myLocationEnabled, eg:

GMSMapView* mapView = ...;
mapView.myLocationEnabled = YES;
Saxon Druce
  • 17,406
  • 5
  • 50
  • 71
0

If you want the animation to your location use animateToLocation:(CLLocationCoordinate2D)location:

GMSMapView* mapView = ...;
mapView.myLocationEnabled = YES;
[mapView animateToLocation:mapView.myLocation];

or you can use animateToCameraPosition:(GMSCameraPosition *)cameraPosition to even adjust the zoom

GMSCameraPosition *cameraPosition = [GMSCameraPosition cameraWithTarget:mapView.myLocation zoom:14.0f;
[mapView animateToCameraPosition:cameraPosition];
Bohrnsen
  • 79
  • 6