Select to view content in your preferred language

iPhone Maps Offline?

3648
21
02-15-2010 03:28 AM
RobDunfey
Regular Contributor
Just wondering if it will be possible to have 'Offline' iPhone maps using the new SDK.  The workflow is a user connects to an ArcGIS Service prior to going out in the field, browses to the area they plan to visit, and then the contents of the service is downloaded and stored locally on the iPhone?

Rob
0 Kudos
21 Replies
MikeQuetel
Deactivated User
Agree with this request... having cached tiles available, to get a user through a period of limited or no internet connectivity would be very, very valuable.
0 Kudos
DiveshGoyal
Esri Regular Contributor
The SDK does not currently support working in offline mode. For all practical purposes, network connectivity is required to work with GIS services. The map control does try to make efficient use of the network, but it relies on having access to the GIS services at any given point.

However, this is very valuable feedback and we will take it into consideration going forward.

Are there any special circumstances under which your application may need to work in a disconnected environment, or is just due to unavailable/choppy network connection?

_
Divesh
0 Kudos
MelvinTan
Emerging Contributor
Having cached tiles would indeed be valuable. For example, a Parks application which uses the map and overlays information such as foot paths, restrooms, attractions etc. In this case having cache would mean less reliance on the data network, resulting in faster loading times too.

That would be an added benefit for iPod Touch users as well, who can first browse the area they intend to visit while connected, so that they can still view the map while at the park, where there is no WIFI as well.
0 Kudos
GeorgeVernardos
Occasional Contributor
The SDK does not currently support working in offline mode. For all practical purposes, network connectivity is required to work with GIS services. The map control does try to make efficient use of the network, but it relies on having access to the GIS services at any given point.

However, this is very valuable feedback and we will take it into consideration going forward.

Are there any special circumstances under which your application may need to work in a disconnected environment, or is just due to unavailable/choppy network connection?

_
Divesh


Accoring to the Reference we can create our own customTileLayerClass inheriting from AGSTiledLayer,  but we do not know how to implement these two methods.

- (UIImage *) tileForLevel: (NSInteger)level row:(NSInteger)row column:(NSInteger) column
- (NSOperation *) tileForLevelAsync: (NSInteger)* level row: (NSInteger)* row column: (NSInteger)* column

Can these delegates be used to retrieve images from application resources instead of Arcgis server?
0 Kudos
MikeQuetel
Deactivated User
The SDK does not currently support working in offline mode. For all practical purposes, network connectivity is required to work with GIS services. The map control does try to make efficient use of the network, but it relies on having access to the GIS services at any given point.

However, this is very valuable feedback and we will take it into consideration going forward.

Are there any special circumstances under which your application may need to work in a disconnected environment, or is just due to unavailable/choppy network connection?

_
Divesh


Thanks for the feedback, Divesh... can't encourage ESRI enough to consider offline and disconnected capabilities in this SDK.

The general scenario I have in mind is:

1) Wireless networks are sometimes unavailable, unreliable or get congested.  The ability to cache base map data allows a user to continue working (doing data collection, for example) if they have the context of these maps.  My application keeps track of network availability and caches the user input locally then uploads it to the server when connectivity returns.  The missing piece would be base maps.  The reason for the lack of connectivity could include being in a rural area, it could be post disaster and the cell network is down, it could be because the user is in a building or area of wireless interference.

I also would be very interested in the answer to gvernar's question:  Could AGSTiledLayer be subclassed such that my class could take on the responsibility of serving locally persisted basemaps?
0 Kudos
DiveshGoyal
Esri Regular Contributor
It is concievable that you can write your own custom layer that uses a local cache. You would be responsible for getting the cache on the device, and then implementing the logic to retrieve a particular tile taking into consideration the cache's tiling scheme. Doable, but can be tricky

We haven't  thoroughly exercised  the workflow of creating custom tiled layers at this time. But you can try subclassing the AGSTiledLayer if you're feeling adventurous,  . Here's how it would work (in theory) :

Sub-classes must provide implementation for the spatialReference , fullEnvelope , initialEnvelope, and units properties declared by AGSLayer, and the tileInfo property declared by AGSTiledLayer. They must also provide implementation for the tileForLevel:row:column: and tileForLevelAsync:row:column: methods and notify the tileDelegate when appropriate.  It is also the responsibility of sub-classes to update the loaded property and notify the delegate when appropriate.
0 Kudos
GeorgeVernardos
Occasional Contributor
It is concievable that you can write your own custom layer that uses a local cache. You would be responsible for getting the cache on the device, and then implementing the logic to retrieve a particular tile taking into consideration the cache's tiling scheme. Doable, but can be tricky

We haven't  thoroughly exercised  the workflow of creating custom tiled layers at this time. But you can try subclassing the AGSTiledLayer if you're feeling adventurous,  . Here's how it would work (in theory) :

Sub-classes must provide implementation for the spatialReference , fullEnvelope , initialEnvelope, and units properties declared by AGSLayer, and the tileInfo property declared by AGSTiledLayer. They must also provide implementation for the tileForLevel:row:column: and tileForLevelAsync:row:column: methods and notify the tileDelegate when appropriate.  It is also the responsibility of sub-classes to update the loaded property and notify the delegate when appropriate.


As i understand the AGSTiledMapServiceLayer gets all  of the following info

spatialReference
fullEnvelope
initialEnvelope
units
tileInfo

from the mapserver using Json    - >  http://mydomain.com/ArcGIS/rest/services/myMap/MapServer?f=json&pretty=true

??? So if this is true than we can store a text file in the application resources, that containins the JSON. Loading the json from this file and populating all the initial fields should be easy .

It would be very helpful if we can take a look at the implementation of AGSTiledMapServiceLayer class. ( .h and .m files ). Is this possible ?
0 Kudos
FrédéricHUMBERT-DROZ
Emerging Contributor
It is concievable that you can write your own custom layer that uses a local cache. You would be responsible for getting the cache on the device, and then implementing the logic to retrieve a particular tile taking into consideration the cache's tiling scheme. Doable, but can be tricky

We haven't  thoroughly exercised  the workflow of creating custom tiled layers at this time. But you can try subclassing the AGSTiledLayer if you're feeling adventurous,  . Here's how it would work (in theory) :

Sub-classes must provide implementation for the spatialReference , fullEnvelope , initialEnvelope, and units properties declared by AGSLayer, and the tileInfo property declared by AGSTiledLayer. They must also provide implementation for the tileForLevel:row:column: and tileForLevelAsync:row:column: methods and notify the tileDelegate when appropriate.  It is also the responsibility of sub-classes to update the loaded property and notify the delegate when appropriate.


Hi,

Thank you for this information. I've been trying to subclass the AGSTiledLayer, but after adding it to the mapview, the tileForLevel:row:column: and tileForLevelAsync:row:column: methods are never called.

Do you know if there is anything special to do in the init: method or anywhere else ? It seems I've implemented all the properties needed.

Best regards,
0 Kudos
JeffPapirtis
Occasional Contributor
have you been able to cache?  I know my skills are not at this point, but this is a must have feature for my companies business applicaiton.
We have field personel that must be able to cache maps for use out in the field where cell coverage is spotty.
0 Kudos