Questions tagged [mkoverlaypathrenderer]
12 questions
7
votes
0 answers
Draw direction arrow in polyline in MKMapView
I want to draw a polyline with the arrow direction. I understand that is not already include in the Mapkit.
I tried to create a custom MKOverlayPathRenderer and override the drawMapRect but I'm a bit confused on how to do this.
Is there any way to…

Hugo
- 295
- 2
- 15
5
votes
1 answer
Polyline drawMapRect optimized drawing
I have lots of long polylines on a map.
I'd like to optimize their drawing, because at a few thousand points the polylines are drawn incredibly slow.
My drawMapRect looks like this :
- for each polyline segment
- verify if it's bounding box…

Templar
- 1,694
- 1
- 14
- 32
4
votes
1 answer
Draw circle with hole by using MKOverlayRenderer does not work well
I'd like to draw circle with hole (like donut) on mapview.
my code is here.
- (void)drawMapRect:(MKMapRect)mapRect zoomScale:(MKZoomScale)zoomScale inContext:(CG ContextRef)context {
WPCircleOverlay * circleOverlay = self.overlay;
CGPoint…

Paul
- 759
- 2
- 7
- 20
4
votes
1 answer
Custom MKOverlay with radius in meters
I made a custom overlay by making an NSObject subclass that conforms to the MKOverlay Protocol and a subclass of MKOverlayPathRenderer. My goal was to make a circular overlay that anchored to the user location on an MKMapView and I have that working…

barndog
- 6,975
- 8
- 53
- 105
3
votes
1 answer
MKMapViewDelegate: How to identifiy overlay in rendererForOverlay
I'm adding two different MKGeodesicPolyline instances to an MKMapView like this
CLLocation *LAX = [[CLLocation alloc] ...];
CLLocation *JFK = [[CLLocation alloc] ...];
CLLocation *LHR = [[CLLocation alloc] ...];
CLLocationCoordinate2D…

hennes
- 9,147
- 4
- 43
- 63
3
votes
0 answers
Animated map overlay: How do I make an MKCircle expand from 0 to its full size when it gets added?
I would like to have my MKCircle expand from 0 to its specified radius size whenever it gets added to the map. MKOverlayRenderer is getting me a nice end result, but it adds the circle too spontaneously. I would like to animate it to have a smoother…

Jaime Connor
- 61
- 5
2
votes
0 answers
MKOverlayPathRenderer color dependent by property
I would like to draw a line on my mapview with a gradient, but the gradient color on a specific position should be dependent on a property from the line (e.g speed or altitude)
I found several MKOverlayPathRenderer which can draw a gradient, but the…

Vario
- 490
- 4
- 13
1
vote
2 answers
How to draw custom shapes on MKMapView
I need to draw custom shapes like Arc, Semi-circle? I tried the below code but it's not rendering anything on the MKMapView.
Is this the right way to draw custom shapes?
class ViewController: UIViewController {
@IBOutlet weak var mapView:…

Anirudha Mahale
- 2,526
- 3
- 37
- 57
1
vote
2 answers
Scroll MKMapView Underneath Circle Drawn MKMapView
UPDATE
I need to draw a circle onto a MKMapView, something where I can get the radius of the circle and it's center coordinate. However, I would also like the circle to be a subview of the MKMapView, so that the map view can scroll underneath the…

tentmaking
- 2,076
- 4
- 30
- 53
1
vote
1 answer
Adding MKOverlayPathRenderer as overlay to MKMapView gets exception
Everything said in topic, so here is the code
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
_pathRenderer = [[MKOverlayPathRenderer alloc] init];
…

htzfun
- 1,231
- 10
- 41
1
vote
0 answers
How to create a static, actual width MKOverlayPathRenderer subclass?
I've been working on a simple path overlay to an existing MKMapView. It takes a CGMutablePath and draws it onto the map. The goals is that the path is drawn representing an actual width. e.g. The subclass takes a width in meters and converts that…

Ben Lachman
- 3,083
- 1
- 28
- 44
0
votes
1 answer
how to get visible overlays in MapKit? (i.e. MKOverlay/MKOverlayRender from a Mapkit Ivew)
How does one get a list (array) of currently visible overlay from a MapkitView?
Background - for example I want to show direction arrows to the center of certain Overlay types on my mapkitview, however how do I get the visible ones? There seems…

Greg
- 34,042
- 79
- 253
- 454