Note that there are some explanatory texts on larger screens.

plurals
  1. POMKOverlay not resizing smoothly
    primarykey
    data
    text
    <p>I have added a MKCircle as MKOverlay to my MKMapView. Also I added an UISlider to decide the radius of the circle. Unfortunately when using this it seems a bit "laggy", not smootly like I want it to be.</p> <p>Example: <a href="http://dl.dropbox.com/u/3077127/mkoverlayDelay.mov">http://dl.dropbox.com/u/3077127/mkoverlayDelay.mov</a></p> <p>This is my code:</p> <pre><code>- (void)addCircle { // draw the radius circle for the marker double radius = 2000.0; MKCircle *circle = [MKCircle circleWithCenterCoordinate:location radius:radius]; [circle setTitle:@"background"]; [mapView addOverlay:circle]; MKCircle *circleLine = [MKCircle circleWithCenterCoordinate:location radius:radius]; [circleLine setTitle:@"line"]; [mapView addOverlay:circleLine]; } - (void)addCircleWithRadius:(double)radius { MKCircle *circle = [MKCircle circleWithCenterCoordinate:location radius:radius]; [circle setTitle:@"background"]; [mapView addOverlay:circle]; MKCircle *circleLine = [MKCircle circleWithCenterCoordinate:location radius:radius]; [circleLine setTitle:@"line"]; [mapView addOverlay:circleLine]; } - (void)sliderChanged:(UISlider*)sender { [mapView removeOverlays:[mapView overlays]]; double radius = (sender.value * 100); [self addCircleWithRadius:radius]; } - (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id &lt;MKOverlay&gt;)overlay{ MKCircle *circle = overlay; MKCircleView *circleView = [[[MKCircleView alloc] initWithCircle:overlay] autorelease]; if ([circle.title isEqualToString:@"background"]) { circleView.fillColor = UIColorFromRGB(0x598DD3); circleView.alpha = 0.25; } else { circleView.strokeColor = UIColorFromRGB(0x5C8AC7); circleView.lineWidth = 2.0; } return circleView; } </code></pre> <p>Does anybody have any suggestions on how I can smoothen this?</p> <p>Best regards,<br/> Paul Peelen</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload