MCPcopy Create free account
hub / github.com/facebook/Rapid / getSourceByID

Method getSourceByID

modules/core/ImagerySystem.js:441–448  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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 /**

Callers 9

_initWaybackAsyncMethod · 0.95
_hashchangeMethod · 0.95
baseLayerSourceMethod · 0.95
chooseDefaultSourceMethod · 0.95
setSourceByIDMethod · 0.95
enableOverlayLayersMethod · 0.95
_startIntroFunction · 0.80
customChangedFunction · 0.80
onMapDrawFunction · 0.80

Calls 1

getMethod · 0.80

Tested by

no test coverage detected