How to build an Apple Map app for iOS using the ArcGIS Runtime SDK for iOS

With the new release of iOS 6, Apple replaces the Map app from Google maps to create its own map application. Even though the new application from Apple has exciting new features, like 3D maps, some users are complaining about the quality of basemap data and the geocoder (trying to find an address or a simple location)

In response, ESRI is providing a set of rich thematic basemaps and applications that allow users to access all of them. With these applications, the user will find a really great routing experience.  Now a user can completely swap out the routing network service, point to a custom off-the–grid road network, and the app works. The app has a very simple/fun drag and drop experience for reordering stops akin to dragging around apps on your iPhone home screen.

This blog post will help you develop an iOS application for iOS 6 using the ArcGIS Runtime SDK for iOS, and it gives you access to great maps and very accurate location services.

This blog post will also show developers how to implement:

  • Different high accurate basemaps.
  • Consume a locations / point of interest service.
  • Consume routing services.
  • Register your routing iOS app to be an extension of Apple’s Map.

The first step is to download the ArcGIS Runtime SDK for iOS, all the information to set your computer can be found at the resource center.

Using the sample Map application, the user to select the basemap they want to use. There are many to choose; from street maps to satellite maps. Like in the Apple Map App, you can switch from one basemap to the other. You can use ArcGIS.com to find the map you would like to use, and in our sample source code, we added a few where the user can scroll and preview.

self.webmap = [AGSWebMap webMapWithItemId:kDefaultWebMapId credential:nil];

self.webmap.delegate = self;

[self.mapView.gps start];

The look and feel of the application can be designed using interface builder. You’ll only need a search tab and a settings button to change maps.

A very important part of having a map is to have a good geocoder to power the user search.  In the previous iOS map application, the user could search on the current extent of the map for points of interest.  The user could also look for “Starbucks Redlands” and the geocoder will display a list of Starbucks coffee shops in Redlands, California.

The ArcGIS Runtime SDK for iOS can consume many geocoder services from different servers.  We recommend using the World Locator that provides results for points of interest as well as addresses.

You can access the web service for the world locator here.

The sample application has many different, excellent maps the user can chose from as well as a great geocoder to find any address or point of interest. The ArcGIS Runtime SDK for iOS can also calculate routing tasks to provide step by step directions between two points as well as having other parameters to make that route more meaningful, creating maps that route around barriers (example: routing around streets that may be blocked by heavy traffic).

The sample is using a routing task for North America found here. Or Europe here

The application is also registered as a routing app, and when installed on the device, the Apple Map App will allow the user to select it to provide a route by switching to the custom application. To register an Apple Map extension is very simple, using xCode 4.5, the developer needs to indicate what kind of routing is provided as well as handle the call from the Map application.

These are the ingredients to create a great Map application for your iPhone, just using the ArcGIS Runtime SDK for iOS. Of course creating a simple and refined user interface is the key of any great useful mobile application.

To get you started, we shared the sample application map source code built using the ArcGIS Runtime SDK for iOS 2.3.2. Scott Sirowy of the iOS development team wrote the Sample Map application we have posted at GitHub. This application will give you a huge head start on your development. The app can easily be extended to take full advantage of other features on your routing service… things like vehicle type, avoiding various obstacles, barriers, etc.

Happy Forking.

This entry was posted in Developer and tagged , . Bookmark the permalink.

Leave a Reply

4 Comments

  1. rick.jones@moncton.org says:

    The GitHub link is not working.

  2. miconnol says:

    Looks like GitHub is down.

  3. Al Pascual says:

    I fixed the GitHub link that was move to a more permanent place. Thanks for the heads up.

    Cheers
    Al

  4. jimmy1122 says:

    Do you wanna build an Apple Map app for iOS using? No problem, we are ready to help you because we have huge information about it. come check out our website, http://www.taoteapps.com, we have a lot information to help making your mobile deployment a success.