is there any sample code or files that would show how to create a map, say of like a theme park or something, but still being able to use like CLLocationCoordinate2D to find where the use is in the theme park?
Asked
Active
Viewed 312 times
3 Answers
1
MapKit doesn't allow you to use your own tiles. You would need to use an alternative. Check out http://mapbox.com/mobile

Patrick Tescher
- 3,387
- 1
- 18
- 31
-
Mapkit does allow you to use your own tiles, hence my app built on MapKit called "Tiled Maps" – Craig May 30 '12 at 21:45
1
Asked and answered many times. Essentially it boils down to looking at the TileMap sample code from WWDC 2010. It'll still load the Google Map in the background and your map over the top.

Craig
- 8,093
- 8
- 42
- 74
-
Not seeing either "tilemap" or "tiled map" in XCode docs sample code. Is there another search? Likewise, searching "map" in the WWDC 2010 videos in iTunes doesn't turn up anything. Can you provide a direct link? – Olie May 15 '13 at 21:02
-
Also, I got here looking to use the (pan/zoom/LOD, mostly) features of MapKit, but on a *fantasy* map of my own creation. (*I.e.*, not on Earth, not with our land masses & oceans.) I haven't had much luck Googling/SO-searching; got any pointers for **that**? Thanks! :) – Olie May 15 '13 at 21:04
-
1https://developer.apple.com/videos/wwdc/2010/ session 127 is called "Customizing Maps with Overlays" Also a Google search for "WWDC 2010 sample code" takes you here http://stackoverflow.com/questions/3111855/wwdc-2010-sample-code which is exactly what you're asking – Craig May 15 '13 at 21:20
0
You can in iOS 7:
NSString *template = @"http://.../tile?z={z}&x={x}&y={y}";
overlay = [[MKTileOverlay alloc] initWithURLTemplate:template];
overlay.canReplaceMapContent = YES;
[map addOverlay:overlay level:MKOverlayLevelAboveLabels];
- (MKOverlayRenderer *)mapView:(MKMapView *)mapView
rendererForOverlay:(id<MKOverlay>)overlay
{
return [[MKTileOverlayRenderer alloc] initWithOverlay:overlay];
}
For more information see MKTileOverlay or WWDC 2013 session 304.

laktak
- 57,064
- 17
- 134
- 164