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
8
votes
2 answers

setNeedsDisplayInMapRect doesn't trigger new drawMapRect: call

I'm using a custom MKOverlay/MKOverlayView to completely cover the Google basemap with my own tiles, which are loaded asynchronously. I follow the pattern of requesting unloaded tiles when I receive a canDrawMapRect:zoomScale: call to my overlay…
TomSwift
  • 38,979
  • 11
  • 115
  • 147
8
votes
1 answer

MKOverlay sometimes disappears

I have two overlay options in my map: a MKCircleOverlay and a MKPolygonOverlay.The first is with variable radius, controlled via an UISlider.The last is customizable depending the number and position of the corners.If I change very fast the radius…
Hari
  • 1,511
  • 15
  • 34
7
votes
1 answer

Change coordinate of MKOverlay for an MKOverlayView

I have an overlay on the map, and I would like to change its coordinates. To do this seamlessly I'm going to call the setNeedsDisplayInMapRect: method after the change has been made to the view. I've tested this out by just changing the fillColor…
Jon Cox
  • 9,614
  • 21
  • 72
  • 113
7
votes
2 answers

What is the difference between MKOverlay and MKAnnotation?

I am new to MKMapView. I implemented a mapView which is looking good. But i was planning to add points or custom image as point in MapView. I can implement it with the help of MKAnnotation, but when i read MKOverlay it was mentioned that…
insomiac
  • 5,354
  • 7
  • 42
  • 71
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
7
votes
2 answers

How do I create an image overlay and add to MKMapView in Swift 2?

I am trying to learn MapKit and am now trying to add an image (not a polygon, circle, rectangle, etc.) as an overlay to the map view. I can't seem to find any sample code to help explain how to do this. So far my code in ViewController.swift…
7
votes
1 answer

How do I show MKOverlay above MKAnnotations?

I'm trying to use an MKOverlay (specifically an MKPolyline) to show a route on the map. However, I need the route to show up above my existing pins (custom MKAnnotationViews). Is there a good way to bring the MKPolyline to the front above the pins?
bplattenburg
  • 536
  • 1
  • 6
  • 32
7
votes
2 answers

How to overlay an image on a IOS map using swift

I am trying to find out how to overlay an image on a IOS map using SWIFT. I have created the following code that overlays a green circle on a map using map kit. I want to replace the green circle with the rectangular image tOver.png 500,500 I am…
new2swift
  • 71
  • 1
  • 2
7
votes
1 answer

Looking for an MKOverlayPathRenderer example

I am trying to figure out how to use a new MKOverlayPathRenderer class. In my app I previously used MKOverlayPathView when building with iOS 6 SDK, but it does not seem to work with iOS 7 SDK unfortunately. So I am trying to move my app from…
slavb
  • 71
  • 1
  • 3
7
votes
2 answers

MKMapView with multiple overlays memory-issue

There seems to be an "issue" with overlays and the MapKit. Unlike annotations, overlays aren't reused and therefore when adding multiple overlays would cause memory-problems on a real device. I've had this problem multiple times. So my question is,…
wkberg
  • 363
  • 2
  • 12
7
votes
1 answer

Moving MKOverlayPathView disappears behind tiles

I'm developing an app where I want to show fictional planes flying from and to airports. This may not be the only things that I want to represent flying through the map. For this I used the sample code from LocationReminders (the MKOverlayPathView…
Fábio Oliveira
  • 2,327
  • 19
  • 30
6
votes
3 answers

How to: Display MKOverlay on MKMapView

I need to display an MKOverlay on a map, but can't get it to actually appear. I'm following the example from Apple's Location Awareness Programming Guide and the overlay wont display. Any help would be greatly appreciated, this is the first iPhone…
nslocum
  • 4,897
  • 1
  • 25
  • 27
6
votes
1 answer

does Mapkit on IOS support dequeuing of overlays? (like it does annotations)

Does Mapkit on IOS support dequeuing of overlays? (like it does annotations). If so what is the code for achieving this? Background: With annotations I believe you can add many, leaving MapKit to instantiate views when required for them via the…
Greg
  • 31,898
  • 75
  • 232
  • 424
6
votes
2 answers

Swift 2 MKMapViewDelegate rendererForOverlay compiler warning

I am trying to draw a polyline on a map in Swift 2. It all works well, but I get a compiler warning for this code: func mapView(mapView: MKMapView!, rendererForOverlay overlay: MKOverlay!) -> MKOverlayRenderer! { if overlay is MKPolyline { …
6
votes
3 answers

How to Display offline map in iphone using Mapkit

How to Display offline map in iphone using mapkit? if i use static image then how do i get current location and pin drop on it? anyone has idea please suggest some solution. Thank you.
mactalent
  • 923
  • 2
  • 13
  • 24
1
2
3
23 24