Select to view content in your preferred language

Garafa's GPS kit offline capability for Google/Bing Maps

2611
5
Jump to solution
11-14-2013 08:46 PM
HumzaAkhtar
Occasional Contributor II
I have read time and again here that it is not possible/permitted to cache google maps / bing maps using ESRI API for iOS

However I was using the GPS Kit by Garafa on my iPhone, and it has the capability to cache map tiles specified by the user by drawing a rectangular,circular or free hand region by finger on the map. The type of maps supported for caching are:

Google Terrain

Google Cycling

Google Satellite

Google Street

Bing Shaded Relief

Bing Street

Bing Image

Google Hybrid

Open Street

Open Topo

the main question is that how is it possible for Garafa to cache google maps/ bing maps in their app if the Bing doesnot support caching tiles for offline use. Do we have to buy a license from Bing or Google in order to cache tiles in the app on the go?
0 Kudos
1 Solution

Accepted Solutions
MichaelDavis3
Regular Contributor
When you use GPSKit you'll notice a little blurb warning you to respect the license agreements of the map services you are using... this is apparently their way of absolving themselves of any responsibility for what you might do with their software.  I'm guessing they sort of fly under the radar since they are a small company and they limit the size of the area you can cache... This probably his keeps the systematic tile download from popping up on the radar of any of the map providers (Google, Bing, etc...).

There really isn't a technical limitation that would prevent downloading and caching any tiled map service - you just need to figure out the order of the tiles in the cache and write the appropriate routines... for instance ESRI stores their tiles in a Z,Y,X hierarchy vs. Z,X,Y for other services.  Garafa have basically created their own tile display engine that can display tiles stored locally regardless of the source.

As far as I know their isn't a license available for purchase to use Google/Bing tiles offline.

-Mike

View solution in original post

0 Kudos
5 Replies
MichaelDavis3
Regular Contributor
When you use GPSKit you'll notice a little blurb warning you to respect the license agreements of the map services you are using... this is apparently their way of absolving themselves of any responsibility for what you might do with their software.  I'm guessing they sort of fly under the radar since they are a small company and they limit the size of the area you can cache... This probably his keeps the systematic tile download from popping up on the radar of any of the map providers (Google, Bing, etc...).

There really isn't a technical limitation that would prevent downloading and caching any tiled map service - you just need to figure out the order of the tiles in the cache and write the appropriate routines... for instance ESRI stores their tiles in a Z,Y,X hierarchy vs. Z,X,Y for other services.  Garafa have basically created their own tile display engine that can display tiles stored locally regardless of the source.

As far as I know their isn't a license available for purchase to use Google/Bing tiles offline.

-Mike
0 Kudos
DiveshGoyal
Esri Regular Contributor
Thanks, Mike for your input on this.

I can confirm that the limitations in such scenarios stem from the restrictive license agreements and not from a technology perspective. We have been able to negotiate favorable terms with data providers  for Esri basemaps. You can cache these basemap tiles for offline use through the Runtime SDKs. An iOS Sample is available here. Currently, the iOS API to download tiles is in beta, expected to be final at next release.

The basemap tiles can be downloaded from http://tiledbasemaps.arcgis.com/
At this point, only World_Street_Map basemap is publicly available to download. To download the remaining Esri basemaps you need an AGOL organization account.
0 Kudos
HumzaAkhtar
Occasional Contributor II
Thanks a lot Mike and Divesh. I didnot know about the offline capability on 10.2. Thanks for sharing that. I am really excited now thinking about the possibilities.
Mike could you share some literature on tile caching like you were mentioning the order of tile cache storage in your post. I  am asking this because if not for ESRI support for offline caching, I am clueless on how to write my own routine for caching tiles on the go. Some technical literature would be very useful. Thanks again
0 Kudos
MichaelDavis3
Regular Contributor
Based on my current understanding of the new tile caching mechanism ESRI has implemented with the 10.2 SDK, it looks like you basically submit a job request to an ArcGIS server - which then extracts and bundles up tiles based on your input parameters and returns them as one big chunk.  That chunk of tiles is then stored on the device as a TPK file which can be accessed via AGSLocalTiledLayer.

It sounds like you are more interested in doing something like GPSKit - which is basically scraping or systematically downloading tiles from a map service.  If this is your goal, the ESRI SDK won't be much help.  You are probably better off writing something based on the MBTiles SDK.  If you want to then integrate your local basemap tiles with elements of the ESRI SDK you will need to implement a custom AGSLocalTiledLayer class that points to an .mbtiles file (basically a SQLite database).  All the pieces are out there, but it still would require a substantial effort to implement.

Not sure if anyone on this forum has done MBTiles SDK -> ESRI SDK integration already - if so, perhaps they'll share their experience.

-Mike
0 Kudos
HumzaAkhtar
Occasional Contributor II
Thanks mike. This was really helpful.
0 Kudos