DigitalGlobe provides Maps API image layers via Mapbox, including satellite imagery layers and general reference basemap layers. Integrating these layers into the map toolkit is almost effortless.
You’ll need to have done the globe or map tutorials, either is fine. Open your HelloEarth project and get ready.
If you haven’t got one here is a suitable ViewController (for Objective-C or Swift) file to start with. This version handles both a globe and a map and makes a nice starting point.
Maps API imagery and basemaps
Maps API provides several beautiful and high-resolution map layers:
Name
Map ID
Description
Recent Imagery
nal0g75k
A “curated snapshot” of recent satellite imagery.
Street Map
nako6329
An enhanced road basemap based.
Terrain Map
nako1fhg
Terrain shading and contours with roads.
Transparent Vectors
nakolk5j
OpenStreetMap with a transparent background.
Recent Imagery / Streets
nal0mpda
Map combining Recent Imagery with streets
The Map ID is prefixed with digitalglobe and is used to request the desired map from the map server.
Basic Map or Globe Setup
In this tutorial we’ll setup the basic map or globe, and then add the desired DigitalGlobe map layer.
If you worked through the globe or the map example, you’ll need to add this little bit of code to your viewDidLoad method. This will make the examples work with either globe or map. If you’re using the ViewController file from above, you don’t need it.
Also, add this additional setup for the map / globe to the end of the viewDidLoad method:
Adding Maps API layers to WhirlyGlobe
Here is where we add the DigitalGlobe map layer to the map / globe. In this example we’ll use Recent Imagery with Streets. We create a MaplyRemoteTileSource, feed it to a MaplyQuadImageTilesLayer, and set a few attributes, and that’s it.
This is what the Recent Imagery with Streets layer looks like over Anchorage, Alaska.
To view a different layer, simply substitute the desired Map ID. Here we’ll try the Terrain Map layer.
Here’s the terrain over Grand Teton National Park in Wyoming.
The Transparent Vectors Layer
As a final example, we’ll demonstrate a use of DigitalGlobe’s Transparent Vectors layer by overlaying it onto a color relief topographic map. Download the topographic map image and the legend image, and add them to your project.
Change the Map ID:
Now add the topo map and the legend.
Finally, lower the view height to zoom in on San Francisco at start-up.
The result shows the ground elevation along every street in San Francisco.