A few days ago when I opened Maverick's Maps.app and I had the curiosity to navigate to a mountainous region I was blown away. The satellite imagery provided by Apple's Maps.app is much better than Google Earth's, at least in the areas I'm interested in.
See below a same-area-comparison of Maps.app vs Google Earth; in the left hand side the cable car pillar is clearly seen whereas in the right hand side it's a total blur:
In Maps.app you can distinguish relatively small features, valleys and ridges in the 3D view, making Maps.app a possible tool to use when planning or remembering a hiking trip. If only there was a way to annotate the map with more than pins.
These here are my notes on trying to annotate Apple's Maps.app imagery with external data.
Using Maps.app with an external data source
The first thing I've tried was using Maps.app itself.
I haven't found any way to add external content (other than pins).
Which is sad, because the MapKit framework powering part of the app (there's also a private framework behind it, which as far as I can tell provides the data behind satellite imagery and vector data) makes it very easy to display tiles from an external provider.
I can only hope a future Maps.app version will offer some way of loading external content (e.g. Google Earth's NetworkLink or maybe exposing MapKit's capability to load external map tiles - see below).
Developing an application using MapKit
As Maps.app was out of the question, I then summoned my Objective-C almost forgotten skills and tried the MapKit framework, freshly arrived in Mavericks from the iOS world.
While using XCode does not require an active (as in currently payed for) Apple developer account, using MapKit does (when a developer account is not active, MapKit will print a warning on the console and refuse to load any Apple provided data).
Once you have an active developer account, XCode requests a MapKit for you.
After the entitlement is approved (in my case it took a half an hour or so), MapKit starts displaying data.
Maps.app is 3D, MapKit is 2D
This is my biggest gripe with MapKit so far.
Maps.app has 3D data (it probably uses something similar to the SRTM dataset to build an elevation profile and warps imagery over the slopes computed based on the elevation grid).
MapKit does not have 3D data and all it offers in this regard is a pseudo-3D view based on tilting the camera. Even this pseudo-3D view is restricted to the standard map view (in satellite and hybrid modes tilting the camera does not work).
Lack of 3D makes MapKit pretty useless for me - the great appeal of MapKit was the good quality of satellite imagery in Romania's mountains but without 3D the imagery gets really hard to decipher as lack of altitude information makes valleys look like ridges and vice-versa.
Integrating OpenStreetMap tiles within a MapKit app
Apple's MapKit makes it very easy to load OpenStreetMap tiles in the MapKit views (pictured below are some tiles from our hiking web application overlaid on top of MapKit's hybrid view:
In 10 or so lines of code you can have tiles in your MapKit based map.
You add an overlay:
NSString *template = @"http://some.server/tiles/{z}/{x}/{y}.png"; MKTileOverlay * overlay = [[MKTileOverlay alloc] initWithURLTemplate:template]; [map addOverlay:overlay];
and in the map's delegate you create a renderer for it:
- (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id < MKOverlay >)overlay { if([overlay isKindOfClass:[MKTileOverlay class]]) { MKTileOverlayRenderer * r = [[MKTileOverlayRenderer alloc] initWithOverlay:overlay]; return r; } return nil; }
What about vectors?
Yes, you can add vectors (points, lines, polygons, custom shapes) as overlays on top of the MapKit view.
The problem is built in overlays are painfully basic.
Meaning I couldn't find a way to display a label (only a pin that displays something when clicked) or that the built in MKPolyline renderer does not display the MKPolyline's title (you have to write your own overlay renderer to do that).
Below is a screenshot of my MapKit test app, showing a couple of valleys in red (using the built in MKPolyline) and a few labels (implemented using a custom data overlay and renderer):
Conclusion
MapKit is a big help when trying to build a map application but don't kid yourself - building a proper mapping app takes a LOT of work.
I look forward to buying a MapKit based app that matches Google Earth's integration capabilities.