Questions tagged [mkpolygonrenderer]

6 questions
4
votes
1 answer

Draw polygon on MapView using Swift

I have a MKMapView, and a set of coordinates I want to connect with a polygon to draw a rectangle. Below is my code that I have started with. import UIKit import MapKit class mapViewViewController: UIViewController { @IBOutlet var map:…
ez4nick
  • 9,756
  • 12
  • 37
  • 69
1
vote
1 answer

How to draw a polygon using Apple Map by MKPolygon

I'm creating a polygon with the help of the below coordinates. Polygon appears fine on the map but I'm wondering about the shape of the polygon. In the below code, I've written to draw a polygon. let points1 =…
sandeep tomar
  • 303
  • 1
  • 5
  • 17
1
vote
1 answer

write text in drawRect MKPolygonRenderer

Ok I'm at my wits end. I'm new to MapKit and writing a health stats app that plots data on a MKMapView relative to where patients live. I can drop annotations, and draw polygons of postcode areas with no problem. However I'd like to write text on…
1
vote
1 answer

How to force call rendererForOverlay

I want to refresh my MKOverlay with a new fillColor (hotSpot[@"intensity"]). Is there a way to force call the rendererForOverlay method? It only gets called once when the map is loaded. -(MKOverlayRenderer*)mapView:(MKMapView*)mapView…
Andrew
  • 3,545
  • 4
  • 31
  • 37
1
vote
0 answers

Displaying a triangle as MKPolygon on MKMap

I am trying to display a triangle as an MKPolygon on a map. So far I have not used swift very much and might be missing some very obvious point. After creating the overlay and calling map.addOverlay() to my surprise neither mapView(mapView:…
user1612877
  • 391
  • 1
  • 5
  • 19
1
vote
0 answers

iOS 7 Mapkit: MKPolygonRenderer subclass - drawMapRect method fails to draw text

My requirement is simple - I have many polygon overlay views to be laid out across my map view. In each of them I want some text. I need to change the text as well as text formatting based on user's activity on particular MKPolygon view. Since my…
Nirav Bhatt
  • 6,940
  • 5
  • 45
  • 89