| 301 | } |
| 302 | } |
| 303 | load(params) { |
| 304 | let { key, id, autoSync = true, syncInBackground = true, syncParams, batched = false } = params; |
| 305 | return this._mapPromise.then(() => new Promise((resolve, reject) => { |
| 306 | if(id === undefined) { |
| 307 | return resolve(this._lookupGlobalItem({ |
| 308 | key, resolve, reject, autoSync, syncInBackground, syncParams |
| 309 | })); |
| 310 | } |
| 311 | return resolve(this._lookUpInMap({ |
| 312 | key, id, resolve, reject, autoSync, syncInBackground, syncParams, batched |
| 313 | })); |
| 314 | })); |
| 315 | } |
| 316 | clearMap() { |
| 317 | this.removeItem('map').then(() => { |
| 318 | this._m = this._initMap(); |