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, ie 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
You should be able to just set myLocationEnabled
, eg:
GMSMapView* mapView = ...;
mapView.myLocationEnabled = YES;
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];
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.