0

How can I overlay geometry on an MKMapView of a specific city or district within a city?

I'm looking at CLGeocoder, MKOverlayView and CLRegion, but I'm a bit confused.

How can I get the coordinates to create an MKPolygon / overlay?

In Apple's example they already have a set of 4 points for Colorado. Do I have to manually fill these points myself from some kind of database? Or can something like CLGeocoder access the geometry of a given district / city / state?

aroooo
  • 4,726
  • 8
  • 47
  • 81
  • This, probably, is a good resource: [Displaying Overlays on a Map](http://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/LocationAwarenessPG/AnnotatingMaps/AnnotatingMaps.html#//apple_ref/doc/uid/TP40009497-CH6-SW15) – fguchelaar Jan 17 '13 at 09:30
  • Thanks for the link, it's given me a bit more information but the part that confused me the most was getting the actual geometry points, in the case of the example: Colorado. I've updated my question. – aroooo Jan 17 '13 at 09:45
  • 1
    Found two questions on SO that might help you: [iOS overlay (MKPolygon) data for all U.S. states?](http://stackoverflow.com/questions/9779978/ios-overlay-mkpolygon-data-for-all-u-s-states) and [Geographical boundaries of states/provinces -> Google Maps Polygon](http://stackoverflow.com/questions/1814169/geographical-boundaries-of-states-provinces-google-maps-polygon) – fguchelaar Jan 17 '13 at 15:24

1 Answers1

1

You'll have to source the data yourself. Geocoding will typically give you a lat/long, and sometimes a range or bounding box, but not actual city/district boundaries.

Craig
  • 8,093
  • 8
  • 42
  • 74