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.

359 questions
2
votes
1 answer

custom overlay(renderer) is getting cut of by map tiles (in some cases)

I wrote a custom renderer to represent a min and a max Radius. In some cases the renderer is not working as expected. It looks like the overlay is getting cut of by the map tiles. See the full video Here is how I did it. Did I miss something? class…
lobax
  • 63
  • 7
2
votes
2 answers

Check if a point on map lies within an overlay

I'm struggling with finding out if a MKPolygon intersects with a MKCircle. This is my situation: I have a map filled with regions. Now the user can set a pin on the map, from where I draw an MKCircle with the pin's location as the center. Now I…
pawi
  • 183
  • 1
  • 12
2
votes
1 answer

mapView:viewForOverlay: not getting called

Hey all..... I know this is a duplicate question but I still cannot get it to work and Im sure Im missing something simple. I have set the delegate in IB and RegionDidChange gets called so I know the mapView delegate is hooked up. However I cannot…
Jules
  • 660
  • 8
  • 29
2
votes
3 answers

iOS - MKOverlayView custom view rect fills works, but line draws do not

New to Map Overlays, but this is a really weird problem. I pass in the mapView.visibleMapRect to my overlay implementation and return that as the boundingMapRect, which is fine for now - just trying to draw a line on the whole map rect. My…
Bink
  • 21
  • 1
  • 3
2
votes
1 answer

inverted circle map fill in swift 4

I am trying to draw a circle on map, when user select option 1 the circle is filled with blue color, when user select option 2, the whole map will be filled with blue while the circle area is colorless. how is that possible? `func…
user173488
  • 947
  • 1
  • 9
  • 20
2
votes
0 answers

How to prevent MKPolygons from overlapping in MKMapView

I have a set of MKPolygons to be drawn in my MKMapView but they end up overlapping each other, which brings the aspect of a patchwork, like in the image below. Is that a way to combine multiple MKPolygons into a single MKPolygon instance, merging…
marcelosalloum
  • 3,481
  • 4
  • 39
  • 63
2
votes
1 answer

Overlay around annotation

Hi I'm trying to create an overlay around my annotations, like apples reminders app, I have already created an MKCircle object which I think I should use to show the overlay but how do I convert my MKCircle object into an MKOVerlay object? maybe…
CFRJ
  • 157
  • 1
  • 12
2
votes
0 answers

Sending MKShape to paramter of incompatible type id MKOverlay Nonnull

I am receiving this warning while I am overlaying the geometry on the map. Any help is greatly appreciated. Warning: "Sending MKShape to paramter of incompatible type id MKOverlay Nonnull." @interface store : NSObject @property (nonatomic, copy,…
Karen
  • 169
  • 1
  • 16
2
votes
1 answer

MKOverlayRenderer gets cut off when rendering MKOverlay but fixed by zooming out

I'm new to iOS development and I'm struggling with porting some code from iOS6 involving the use of MKOverlay. When the overlay radius or coordinate change, the renderer should update the display accordingly in real time. This part works, but if I…
kudos
  • 101
  • 3
2
votes
1 answer

How to restrict Mapkit to certain zoom levels?

Currently we are consuming a wms service instead of apple map. we override LoadTileAtPath to return the tiles from server. Our problem is that as the applications is taking to much time load the map tiles at the remote areas with very weak network…
vignesh kumar
  • 2,310
  • 2
  • 25
  • 39
2
votes
1 answer

MKOverlayRenderer stretches image

I would like to place an image in a map overlay which will scale along with the map. Using the code below, the image appears in the map view but it is stretched to fit the view. How can I keep the original aspect ratio of the image inside the…
wigging
  • 8,492
  • 12
  • 75
  • 117
2
votes
0 answers

Dynamic MKOverlay changing its boundingMapRect

Is it possible to have a MKOverlay that can change its bounds over time? The boundingMapRect property is used to define its bounding box. The boundingMapRect documentation states (emphasis added): Implementers of this protocol must set this area…
Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
2
votes
1 answer

How to use MKMapKit to generate polyline for Continental United States Boundary?

Note: If this question requires more information, please add a comment. Details: I would like to generate a boundary line around the continental United States on an MKMapView. The idea is to begin drawing overlays on the area outside of the country…
Tommie C.
  • 12,895
  • 5
  • 82
  • 100
2
votes
0 answers

MapKit Overlays with kCGBlendModeMultiply

I have a very specific use case with MKMapView. I generate a big amount of MKPolygons (about 15000) and render them on an overlay. To increase the performance I do following steps: add one single overlay to the map view which is of size of the…
OlegLanger
  • 41
  • 4
2
votes
2 answers

Casting MKOverlay to MKPolyline return null

I use the following delegate method to draw route on Map. It works fine most of the time except in one route that has large coordinates array. Sometimes it can cast the MKOverlay to MKPolyline and sometimes it cannot for the same route. Any idea…
Sarah
  • 1,595
  • 3
  • 25
  • 34