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

Draw a circle of 1000m radius around users location in MKMapView

(Using iOS 5 and Xcode 4.2) I have an MKMapView and want to draw a circle of 1000m radius around the user location. On the surface it would seem that implementing the mapView:viewForAnnotation: map view delegate method, and adding a custom…
Jon Cox
  • 9,614
  • 21
  • 72
  • 113
31
votes
4 answers

How to capture Tap gesture on MKMapView

I am trying to capture tap event on my MKMapView, this way I can drop a MKPinAnnotation on the point where user tapped. Basically I have a map overlayed with MKOverlayViews (an overlay showing a building) and I would like to give user more…
28
votes
8 answers

How to detect taps on MKPolylines/Overlays like Maps.app?

When displaying directions on the built-in Maps.app on the iPhone you can "select" one of the usually 3 route alternatives that are displayed by tapping on it. I wan't to replicate this functionality and check if a tap lies within a given…
myell0w
  • 2,120
  • 1
  • 20
  • 25
25
votes
8 answers

Detecting touches on MKOverlay in iOS7 (MKOverlayRenderer)

I have an MKMapView with possibly hundreds of polygons drawn. Using MKPolygon and MKPolygonRenderer as one is suppose to on iOS7. What I need is a way of acting upon the user touching one of the polygons. They represent an area on the map with a…
manecosta
  • 8,106
  • 3
  • 23
  • 37
12
votes
4 answers

Add inverted circle overlay to map view

(Using iOS 5 and Xcode 4.2.) I've followed the instructions here: http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/AnnotatingMaps/AnnotatingMaps.html#//apple_ref/doc/uid/TP40009497-CH6-SW15 and used…
Jon Cox
  • 9,614
  • 21
  • 72
  • 113
11
votes
1 answer

MKPolyline strange rendering related with zooming in MapKit

I have very simple View Controller to demonstrate this strange rendering behavior of MKPolyline. Nothing special just normal api calls. import UIKit import MapKit class ViewController: UIViewController, MKMapViewDelegate { @IBOutlet weak var…
Marcin Kapusta
  • 4,030
  • 2
  • 30
  • 46
11
votes
6 answers

How to draw a MKCircle whose fill color is not solid but an image

I found out how to draw a cricle around map annotation. I do it like this: MKCircle *circle = [MKCircle circleWithCenterCoordinate:theCoordinate radius:15000]; [myMap addOverlay:circle]; -(MKOverlayView *)mapView:(MKMapView *)mapView…
DixieFlatline
  • 7,537
  • 23
  • 92
  • 145
10
votes
3 answers

Draw text in circle overlay

I'm trying to draw some circle overlays containing text on MKMapView. I have subclassed the MKCircleView, in which I put the following (based on this), but the text does not appear. The circles show up correctly. (Also tried the first response's…
Templar
  • 1,674
  • 1
  • 13
  • 32
9
votes
1 answer

MapView overlay is cutting off after zoom in

I am facing a weird problem with MKMapView. I have used a MKOverlayRenderer. Now the problem is when I am zooming out image showing correctly. But in case of zoom in, some portion of the image are cutting off. It's looking like a portion of MapView…
Tapas Pal
  • 6,566
  • 6
  • 32
  • 76
9
votes
3 answers

Animating an MKOverlayView

I have an MKOverlayView that displays animated radar data as a series of images. The issue I have is that the radar images are chopped into tiles by MapKit. To swap images I have a timer that calls an update function which sets the current image in…
Aaron
  • 2,345
  • 1
  • 22
  • 24
9
votes
1 answer

MKMapView overlay Vector tiles

Is there any way I can make vector tiles and overly them on MKMapView in iOS 6 and above? I know how to overlay images using MKOverlayView, but they are raster images.
Afnan
  • 848
  • 1
  • 12
  • 35
9
votes
6 answers

MKPolylineRenderer produces jagged, unequal paths

I am using the iOS 7 MapKit APIs to produce 3D camera movements on a map that displays an MKDirectionsRequest-produced path. The path is rendered by MKOverlayRenderer like so: -(void)showRoute:(MKDirectionsResponse *)response { for (MKRoute *route…
Alex Fringes
  • 181
  • 5
9
votes
1 answer

Smooth resizing of MKCircle

How can I achieve a smooth resizing of a MKCircleView on a UIMapView when adjusting an NSSlider? Apple has managed to do it in the Find my friends app when creating geofences…
user2567410
  • 91
  • 1
  • 3
9
votes
2 answers

Weather app with refreshing overlays

I am planning to duplicate the application below just to learn about making geographical apps. How could this high resolution image be generated quickly and without a flicker during the updating? I have been struggling to update my overlays well. My…
user1724168
8
votes
2 answers

Animated gif not working in MKMapView overlay using MKOverlayRenderer

I am trying to display an animated gif in an overlay for MKMapView. The overlay is created using the MKOverlayRenderer. To animate the gif in iOS 7, I'm using the UIImage+animatedGIF category posted here on GitHub. The image of the animated gif…
wigging
  • 6,561
  • 5
  • 59
  • 95
1
2 3
23 24