Binary Distribution

The binary distribution is one of the easiest ways to get started with WhirlyGlobe-Maply. We distribute the toolkit as a framework for iOS device and simulator.

First, download the binary distribution and unzip it into your projects directory. It should look something like this:

projects/WhirlyGlobeMaplyComponent.framework

This guide will simply refer to it as BinaryDirectory for purposes of indicating paths.

You will need your HelloEarth project from earlier for the next part.

Adding the Dependencies

We build WhirlyGlobe-Maply as a binary framework. Those need to be explicitly imported into the project.

Adding the Framework

To add an external library in Xcode, select the top level HelloEarth node in the project tab, click the + at the bottom, and then Add Files from the Add Other dropdown.

Navigate to your BinaryDirectory and select WhirlyGlobeMaplyComponent.framework., then click Open.

We’ll need to add some libraries that WG-Maply needs. Navigate to the HelloEarth target in the project settings, and in the General section click + to add the following.

+ CoreLocation
+ libz.1
+ libxml2.2
+ libsqlite3
+ libc++.1
+ libc++abi

Adding the Dependent packages

Next, we need to indicate where to find the framework and the header files. Open up Build Settings and scroll down to Framework Search Paths. Add your BinaryDirectory here. This should be the level where your WhirlyGlobeMaplyComponent.framework directory lives.

For the header files, find the Header Search Paths in your Build Settings. Add the path to your BinaryDirectory plus Headers, like so.

"BinaryDirectory/WhirlyGlobeMaplyComponent.framework/Headers/"

Adding the Dependent Project

Last, we’ll need to pull in a bridging header for Swift. If you’re not using Swift you don’t need to do this.

Go to Build Settings and look for “Objective-C Bridging Header”.

Adding the Objective-C bridging header

Type there the following path:

BinaryDirectory/WhirlyGlobe-MaplyComponent/Headers/MaplyBridge.h

Don’t forget to replace BinaryDirectory with your own.

Try and compile, just to make sure the basic are working. But that’s it! You should be set up properly for a project using WG-Maply.

Next up, let’s look at building a map or a globe.