Remove or Edit User Location Blue Pulsing Circle

How to present Blue circle of current location in MKMapView iphone

You should set the setShowsUserLocation: property of your map view to YES. This can be done programmatically or in Interface Builder. Be careful, as I believe the simulator still shows the user location in Cupertino, CA.

Also, if you continue tracking the user and their movements, the blue indicator will continue to move as they do.

How to change proximity of user location annotation

Take a look at: https://github.com/TransitApp/SVPulsingAnnotationView

Add following files from Library:

SVAnnotation.h
SVAnnotation.m

SVPulsingAnnotationView.h
SVPulsingAnnotationView.m

Import:

#import "SVAnnotation.h"
#import "SVPulsingAnnotationView.h"

Using SVPulsingAnnotationView you can set pulseScaleFactor property to change radius,use below code in viewForAnnotation method when you found UserLocation:

        static NSString *identifier = @"currentLocation";
SVPulsingAnnotationView *pulsingView = (SVPulsingAnnotationView *)[self.mapView dequeueReusableAnnotationViewWithIdentifier:identifier];

if(pulsingView == nil) {
pulsingView = [[SVPulsingAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:identifier];
pulsingView.annotationColor = [UIColor colorWithRed:0.678431 green:0 blue:0 alpha:1];
pulsingView.pulseScaleFactor=7.0;//Change pulseScaleFactor as required
pulsingView.canShowCallout = YES;
}

return pulsingView;

How to know when click on the map there is already a circle created and show alert to delete and edit that circle in MAPKIT?

You can get the all overlays that have been added on mapView using following code.

self.mapView.overlays

It will return an array containing all overlays. You can then check for existence of any prior overlay.

pulsating blue circle and dot in mapkit - iPhone SDK

Implement the delegate method:

- (MKAnnotationView *)mapView:(MKMapView *)mv viewForAnnotation: (id<MKAnnotation>)annotation

and return nil if if (annotation == mv.userLocation). This tell the MKMapView to use whatever standard annotation it deems appropriate.

How to change color of bubble for user's location in MapKit?

You can change the tintColor of the mapView with:

mapView.tintColor = UIColor.greenColor()

Put this in the viewDidLoad() of the ViewController where your mapView is embedded.



Related Topics



Leave a reply



Submit