mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
Updated tpk layer doc
This commit is contained in:
parent
8826281e91
commit
167a25ea89
@ -1,17 +1,16 @@
|
||||
API Doc for TPKLayer
|
||||
====================
|
||||
# API Doc for TPKLayer
|
||||
|
||||
##O.esri.TPK.TPKLayer
|
||||
## O.esri.TPK.TPKLayer
|
||||
|
||||
The `offline-tpk-min.js` library extends a tiled map service and provides the following tools for working with and displaying tiles from a .tpk file (ArcGIS Tile Package).
|
||||
|
||||
###Constructor
|
||||
### Constructor
|
||||
|
||||
Constructor | Description
|
||||
--- | ---
|
||||
`O.esri.TPK.TPKLayer()` | Creates an instance of the TPKLayer class. This library allows you to extend a TiledMapServiceLayer for the purpose of displaying a TPK file as a map.
|
||||
|
||||
###Properties
|
||||
### Properties
|
||||
Property | Value | Description
|
||||
--- | --- | ---
|
||||
`map` | Object | Refers to the main applications Esri.Map object.
|
||||
@ -25,7 +24,7 @@ Property | Value | Description
|
||||
`DB_INIT_ERROR` | "dbInitError"| An event property indicating an error occurred while initializing the database.
|
||||
`NO_SUPPORT_ERROR` | "libNotSupportedError"| An event property indicating the library won't work on this browser.
|
||||
|
||||
###Methods
|
||||
### Methods
|
||||
Methods | Returns | Description
|
||||
--- | --- | ---
|
||||
`extend(files)`| nothing | Overrides a TiledMapServiceLayer. Files is an array of Entry Objects derived from a zip (tpk) file parsed via zip.js. As soon as this method is called it will extract all the necessary information from the zip file and display the TPK as a map.
|
||||
@ -35,20 +34,20 @@ Methods | Returns | Description
|
||||
`loadFromURL(tile,callback)` | `callback(success,err)` | Use this method when working with both tiled map services and TPKs. With this method you can force load tiles into the database. Use this in conjunction with OfflineTilesBasic.saveToFile() and OfflineTilesAdvanced.saveToFile(). The `tile` property must confirm to the following Object construction: {/\* String \*/ url, /\* base64 String \*/ img}. Returns a boolean that indicates if the load was successful or not.
|
||||
`isDBValid()` | boolean | Verifies whether not the browser supports this library.
|
||||
|
||||
###Events
|
||||
### Events
|
||||
Event | Value | Description
|
||||
--- | --- | ---
|
||||
`DATABASE_ERROR_EVENT` | "databaseErrorEvent" | An error occured while reading or writing to the local database.
|
||||
`VALIDATION_EVENT` | "validationEvent" | An event related to various checks to insure library functionality is supported.
|
||||
`PROGRESS_EVENT` | "progress" | Event indicated progress status while parsing a TPK file. Parsing can take a while depending on how large the TPK is.
|
||||
|
||||
###TiledMapServiceLayer Override
|
||||
### TiledMapServiceLayer Override
|
||||
|
||||
Methods | Returns | Description
|
||||
--- | --- | ---
|
||||
`getTileUrl(level, row, col)` | String | Use the url's level, row and column to retrieve tiles as requested by the ArcGIS API for JavaScript. If a tile is in the local database it is returned. If it is not then the library parsing the TPK file for the appropriate tile image. If `isDBWriteable()` is set to true (default), then an image retrieved from the TPK will be written to the database. Tile retrieval times from images stored in the database are significantly faster than pulling images from the TPK.
|
||||
|
||||
###O.esri.zip
|
||||
### O.esri.zip
|
||||
|
||||
Integrates zip.js into the TPKLayer library. Here is a short listing, for a completing listing of zip.js functionality go [here](http://gildas-lormeau.github.io/zip.js/).
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user