Questions tagged [mkoverlay]

MKOverlay is part of Apple's Map Kit framework for developing iOS applications. The primary purpose of MKOverlay is to add one or more visual overlays to an existing MKMapView (base map). There are different kinds of overlays, like circles (MKCircle), polylines (MKPolyline), polygons (MKPolygon) or custom overlays as offline maps.

MKOverlay is part of Apple's Map Kit framework for developing iOS applications. The primary purpose of MKOverlay is to add one or more visual overlays to an existing MKMapView (base map). There are different kinds of overlays, like circles (MKCircle), polylines (MKPolyline), polygons (MKPolygon) or custom overlays as offline maps.

354 questions
5
votes
1 answer

How to draw a line on MKMapView showing the route a user has taken?

I have had a look around online to try and find out the best way to draw a line showing the route a user has travelled. I think I need to use the MKOverlayView, and I guess I need to collect a selection of data points to plot (would these be GPS…
user843337
5
votes
2 answers

App crashing when I add overlay to mkmapview

I am trying to add annotations and overlays to a mapview but it crashes randomly. It is an EXC_BAD_ACCESS error, but zombies doesn't tell me anything. It says it is crashing on CG::Path::apply_transform(CGAffineTransform const&). I have looked…
utahwithak
  • 6,025
  • 2
  • 38
  • 56
5
votes
1 answer

Custom MKOverlayView line width

I have a custom MKOverlayView, which draws a simple line. In drawMapRect: I am setting CGContextSetLineWidth(context, 30); This looks fine when completely zoomed in, but when you zoom out, the line becomes more and more thin. The MKOverlayView…
GendoIkari
  • 11,134
  • 6
  • 58
  • 100
5
votes
2 answers

MKOverlayView to be rotated

I have an overlay of route to be placed over a map. I have to adjust its rotation so that it overlaps exactly with the underlying map view. How can I achieve this? I have found the angle to rotate. How can I rotate my overlay view? Far till now I…
Meera
  • 1,019
  • 6
  • 20
5
votes
2 answers

MKPolygon with holes

I searched over the internet but I couldn't find an answer to this. It is possible to draw a hole in a MKPolygon? Something like this: I remember I saw something like this, but I'm not sure if it was related to iOS. It is possible to do this and…
ov1d1u
  • 982
  • 13
  • 36
5
votes
2 answers

MKOverlay overlays everything with weird circumstances only on ios5?

I have a MKMapView that is having a very strange problem which is kind of hard to explain. I have an MKOverlay that is saved between sessions by saving the points of the overlay to a file and loading the overlay in viewDidLoad. So here's the…
Shredder2794
  • 1,579
  • 4
  • 26
  • 45
5
votes
1 answer

Adding multiple Overlays on map view takes more time

I'm trying to add multiple overlays of about 1500 on map view. I'm getting the locations from database and adding them on map view. The time to get data from database is very low but the time it takes to draw them on map is very high which is about…
smily
  • 347
  • 1
  • 6
  • 18
5
votes
1 answer

Weather radar overlay on MapKit

I'v searched hi and low and being a novice developer I'm looking for some help. What I need to do is display weather radar over a map for a app I am trying to develop. Most of the content I have run across is outdated. My project is created using…
Joe Yetter
  • 71
  • 4
5
votes
1 answer

lines are not being drawn on overlay view

I am trying to draw a straight line between two points in overlay view. In MKOverlayView method, I think I am doing correctly but I don't understand why it's not drawing any lines... Does anyone know why? - (void)drawMapRect:(MKMapRect)mapRect…
in His Steps
  • 2,535
  • 5
  • 25
  • 37
5
votes
2 answers

Is there a way to add text using Paths Drawing

I have a map custom view that inherit from MKOverlayPathView. I need this custom view to display circle, line and text. I already managed to draw circle and line using path drawing CGPathAddArc and CGPathAddLineToPoint functions. However, I still…
user836026
  • 8,705
  • 12
  • 68
  • 119
4
votes
1 answer

Subtract two MKCircle or how can I draw a ring on my map in MapKit?

I am trying to add a ring overlay to a map in MapKit. Can I subtract one MKCircleView from another MKCircleView or do I need to code my own custom overlay?
TimoP
  • 51
  • 3
4
votes
1 answer

Callout from MKPolylineView?

Is there any way to show a callout when a person touch a MKPolylineView? i tried to add a UITapGestureRecognizer and in selector display a callout in some coordinate. but didnt work. any suggestions for making this? the following is what i tried in…
47tucanae
  • 93
  • 2
  • 8
4
votes
0 answers

MKMapView - Redrawing overlays in the most efficient way

I have an MKMapView with 2 overlays. They represent 1. The route someone has taken. 2. A series of circular regions of interest. In order to update either of the overlays I update their data, then invalidate their related view: [(RoutePolyline…
Undistraction
  • 38,727
  • 46
  • 165
  • 296
4
votes
2 answers

MKOverlay update flashing

In my app, I use an MKPolyline to track the user's path. Sometimes (and not all the time, which I don't understand), when a new line segment gets added to the map, the entire line flashes. Sometimes it doesn't. This is the code being used to add the…
eric.mitchell
  • 8,501
  • 12
  • 50
  • 91
4
votes
2 answers

I need a dead simple implementation of MKCircle overlay

I have a small map on my view that I want to drop an MKCircle overlay onto. I have all the coords and radius as I am creating regions for monitoring. I would like to display this region back to the user so they will know what the boundaries are.…
Bill Burgess
  • 13,768
  • 6
  • 47
  • 85
1 2
3
23 24