* getSource * Returns an ImagerySource for the given `sourceID` * @param {string} sourceID - The sourceID to get * @return {ImagerySource?} The `ImagerySource` with the given ID, or `null` if not found
(sourceID)
| 439 | * @return {ImagerySource?} The `ImagerySource` with the given ID, or `null` if not found |
| 440 | */ |
| 441 | getSourceByID(sourceID) { |
| 442 | if (!this._imageryIndex) return null; // called before init()? |
| 443 | |
| 444 | if (/^EsriWayback/i.test(sourceID)) { // ignore start date, if any |
| 445 | sourceID = 'EsriWayback'; |
| 446 | } |
| 447 | return this._imageryIndex.sources.get(sourceID.toLowerCase()); |
| 448 | } |
| 449 | |
| 450 | |
| 451 | /** |
no test coverage detected