mirror of
https://github.com/Esri/offline-editor-js.git
synced 2025-12-15 15:20:05 +00:00
switched mis-labeled properties and events
This commit is contained in:
parent
26517461e6
commit
d6ad385f4e
@ -23,7 +23,7 @@ define([
|
||||
MAX_DB_SIZE: 75, // Recommended maximum size in MBs
|
||||
TILE_PATH:"", // The absolute path to the root of bundle/bundleX files e.g. V101/YOSEMITE_MAP/
|
||||
RECENTER_DELAY: 350, // Millisecond delay before attempting to recent map after an orientation change
|
||||
DATABASE_ERROR: "databaseError", // An error thrown by the database.
|
||||
DATABASE_ERROR_EVENT: "databaseErrorEvent", // An error thrown by the database.
|
||||
PARSING_ERROR: 'parsingError', // An error was encountered while parsing a TPK file.
|
||||
DB_INIT_ERROR: "dbInitError", // An error occurred while initializing the database.
|
||||
DB_FULL_ERROR: "dbFullError", // No space left in the database.
|
||||
@ -186,14 +186,14 @@ define([
|
||||
this.store.init(function(result){
|
||||
if(result == false){
|
||||
console.error(new Error( "There was an error initializing the database.").stack);
|
||||
this.emit(this.DATABASE_ERROR,{msg:this.DB_INIT_ERROR, err: null});
|
||||
this.emit(this.DATABASE_ERROR_EVENT,{msg:this.DB_INIT_ERROR, err: null});
|
||||
}
|
||||
else{
|
||||
this.store.usedSpace(function(size,err){
|
||||
var mb = this._bytes2MBs(size.sizeBytes);
|
||||
if(mb > this.MAX_DB_SIZE){
|
||||
console.error(new Error( "Database is full!").stack);
|
||||
this.emit(this.DATABASE_ERROR,{msg:this.DB_FULL_ERROR,err : err});
|
||||
this.emit(this.DATABASE_ERROR_EVENT,{msg:this.DB_FULL_ERROR,err : err});
|
||||
}
|
||||
this.emit(this.VALIDATION_EVENT,{msg:this.DB_VALIDATED,err : null})
|
||||
console.log("DB size: " + mb + " MBs, Tile count: " + size.tileCount + ", Error: " + err)
|
||||
@ -416,7 +416,7 @@ define([
|
||||
if (that._isDBWriteable)that._storeTile(url, result, db,function(success,err){
|
||||
if(err){
|
||||
console.error(new Error( "Error writing to database." + err).stack);
|
||||
that.emit(that.DATABASE_ERROR,{msg:"Error writing to database. ", err : err});
|
||||
that.emit(that.DATABASE_ERROR_EVENT,{msg:"Error writing to database. ", err : err});
|
||||
}
|
||||
});
|
||||
callback(result,tileId, url);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user