From 41790a858483d8e714caeea424d3ad3600516138 Mon Sep 17 00:00:00 2001 From: Andy Gup Date: Mon, 20 Mar 2017 09:20:33 -0600 Subject: [PATCH] Update offline tiles advanced --- doc/offlinetilesadvanced.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/offlinetilesadvanced.md b/doc/offlinetilesadvanced.md index 1a4b737..4c0fafa 100644 --- a/doc/offlinetilesadvanced.md +++ b/doc/offlinetilesadvanced.md @@ -1,5 +1,4 @@ -API Doc for OfflineTilesAdvanced -==================================== +# API Doc for OfflineTilesAdvanced There are two different libraries for taking tiles offline: `offline-tiles-basic-min.js` and `offline-tiles-advanced-min.js`. The basic library is for use with ArcGIS.com web maps and partial/intermittently offline use cases. You won't be able to restart or reload your app when using this library offline. @@ -7,21 +6,21 @@ If you have a requirement for restarting or reloading the app while offline then If you have a requirement for using token-based security on your tiled map service then you'll need to use this library. -##O.esri.Tiles.OfflineTilesAdvanced +## O.esri.Tiles.OfflineTilesAdvanced The `offline-tiles-advanced-min.js` library provides the following tools for working with tiled map services. This library is designed for both partial and full offline use cases, and it will work if you have a requirement for browser reloads or restarts while offline. -###Constructor +### Constructor Constructor | Description --- | --- `O.esri.Tiles.OfflineTilesAdvanced(` `url,callback,state,dbConfig)` | Creates an instance of the offlineTilesAdvanced class. This library allows you to extend an ArcGISTiledMapServiceLayer with offline capability as well as manage the online/offline resynchronization process. Any Esri basemap REST endpoint should work.

The `state` property is a boolean for specifying if the application is intializing the layer online (true) or offline (false). It defaults to `true`. When you first load the map it is a best practice to set this property to `true`.

`dbConfig` is an optional object that can be used to customize the database name (`dbName`) and the object store (`objectStoreName`) name. Example: `{dbName: "TILES_TEST", objectStoreName: "TILES"}`. -###Properties +### Properties Property | Value | Description --- | --- | --- `layer.showBlankTiles`| `true` | By default the library will show a 256x256 grey PNG image that says "NO TILE". To override this behavior, especially if you are using multiple tile layers and you don't want the grey "NO TILE" image to interfere then set this property to `false`. `layer.offline.proxyPath`| `null` | The default is `null`. If you have a CORS-enabled service then use the default. Don't forget to check your proxy configuration to allow connections for all possible services that you might be using. More information on using proxies with ArcGIS can be found here: [https://developers.arcgis.com/javascript/jshelp/ags_proxy.html](https://developers.arcgis.com/javascript/jshelp/ags_proxy.html). -###Methods +### Methods Methods | Returns | Description --- | --- | --- `prepareForOffline(` `minLevel, maxLevel, extent, ` `reportProgress)` | `callback(number)` | Retrieves tiles and stores them in the local cache. For more information see [How To Use Tiles Library](howtousetiles.md).