Update offline tiles advanced

This commit is contained in:
Andy Gup 2017-03-20 09:20:33 -06:00
parent d622771965
commit 41790a8584

View File

@ -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. <br><br>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`. <br><br>`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).