I would like to develop a web app that runs on any device (including iPad and iPhone) in a disconnected mode. It is OK if the user is required to browse around and download mapservice data to a local cache before disconnecting and heading to the field.

I would like to do this with Esri's javascript SDK. (There is an existing app for which the mapservices have been set up, however it is written in Silverlight. I've been asked to port it to work with the iPad in a disconnected mode).

Caching ArcGIS Online tiles is a violation of the terms of use. Are there any restrictions on caching OpenStreetMap? If not, then how could I cache OSM locally and use that instead of the web service while disconnected.

For the vector data, I would like to provide a button that runs a query and downloads the json locally. Ideally I'd like to transparently redirect subsequent calls to fetch json from local storage, but I realize this is a bit naive. Does anyone know any good strategies for doing that?

  • 1
    +1 for a good question, pls make us notify if you make remarkeable progress...
    – Aragon
    May 4 '12 at 18:52
  • This is an awesome question. There's got to be more people that know about this stuff.
    – dchaboya
    Oct 18 '12 at 17:05

i dont have any idea about online to local for caching but you can alternativly make pre-generated map then you can uploud it to your device.

for preapearing cached map you can use mobac - Mobile Atlas Creator:

Mobile Atlas Creator (formerly known as TrekBuddy Atlas Creator) is an open source (GPL) program which creates offline atlases for GPS handhelds and cell phone applications like TrekBuddy, AndNav and other Android and WindowsCE based applications. For the full list of supported applications please see the features section. Additionally individual maps can be exported as one large PNG image with calibration MAP file for OziExplorer. As source for an offline atlas Mobile Atlas Creator can use a large number of different online maps such as OpenStreetMap and other online map providers.

but for creating ofline map from online services, you should look at osmdroid which provides Tools / Views to interact with OpenStreetMap-Data. And there is some patches here for creating OSMTileProvider to switch between online and pre-cached ofline map...

and from android cookbook:

To use OSM in your android app, your project must be Android API level 3 (version 1.5) or higher. You need to include 2 jars in the Android project namely, osmdroid-android-x.xx.jar and slf4j-android-1.5.8.jar. OSMDroid is a set of tools for OpenStreetMap data; SLF4J is (yet another) simplified logging facade. These can be downloaded from the links below:

osmdroid jar file.

slf4j jar file.

there is a question similar to yours is here, how can I use OpenStreetMap data to make an Android app completely offline? :)

the last is that i think mapping on mobile devices for local data is immature topic for now....

i hope it helps you...


If you use OpenLayers 2.12RC2 (the stable version is coming), there is a build-in function to do this. See cache-read and cache-write examples. But I'm not sure you will have enought space throught html5 storage for all OSM :(

You can also use MBTiles to keep OSM Tiles in SQLite database. Always throught OpenLayers, you can access them. See an example in PHP or another one in Python See MBtiles implementation doc to know more

You can also find a script to retrieve tiles for a define extend or you can generate your own tiles and after reused them in your mobile app.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.