mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
added code comments
This commit is contained in:
parent
1649391f13
commit
15afc2989f
@ -18,6 +18,15 @@ define([
|
||||
"use strict";
|
||||
var TilesCore = function(){
|
||||
|
||||
/**
|
||||
* Retrieves a tile from local store.
|
||||
* @param image a holder for the image that is retrieved from storage.
|
||||
* @param imageType
|
||||
* @param url the url of the tile
|
||||
* @param tileid a reference to the tile's unique level, row and column
|
||||
* @param store
|
||||
* @private
|
||||
*/
|
||||
this._getTiles = function(image,imageType,url,tileid,store){
|
||||
store.retrieve(url, function(success, offlineTile)
|
||||
{ console.log("TILE RETURN " + success + ", " + offlineTile)
|
||||
@ -48,6 +57,14 @@ define([
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves an image from a tile url and then stores it locally.
|
||||
* @param url The image's url
|
||||
* @param proxyPath
|
||||
* @param store
|
||||
* @param callback
|
||||
* @private
|
||||
*/
|
||||
this._storeTile= function(url,proxyPath,store,callback) // callback(success, msg)
|
||||
{
|
||||
url = url.split("?")[0];
|
||||
@ -81,6 +98,15 @@ define([
|
||||
req.send(null);
|
||||
};
|
||||
|
||||
/**
|
||||
* Retrieves all the cells within a certain extent
|
||||
* @param context Layer
|
||||
* @param minLevel minimum zoom level
|
||||
* @param maxLevel maximum zoom level
|
||||
* @param extent Esri.Extent
|
||||
* @param callback
|
||||
* @private
|
||||
*/
|
||||
this._createCellsForOffline = function(context,minLevel,maxLevel,extent,callback){
|
||||
var tilingScheme = new TilingScheme(context);
|
||||
var cells = [];
|
||||
@ -281,6 +307,12 @@ define([
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets all the important bits out of the map services description page
|
||||
* @param data The http response via f=pjson
|
||||
* @param callback callback({initExtent,fullExtent,tileInfo,resultObj});
|
||||
* @private
|
||||
*/
|
||||
this._parseGetTileInfo = function(data,callback){
|
||||
|
||||
var fixedResponse = data.replace(/\\'/g, "'");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user