mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 18:34:02 +00:00
21 lines
574 B
JavaScript
21 lines
574 B
JavaScript
/** Semantic candidate operations supplied to search and annotation selection. */
|
|
export const FEATURE_SOURCE_METHODS = Object.freeze([
|
|
'getAdministrativeAreas',
|
|
'getAreaGeometry',
|
|
'getNeighborhoodAreas',
|
|
'getStreetAreas',
|
|
'getStreetLines',
|
|
'getFootprints',
|
|
'getEnclosingAreas',
|
|
'getMonuments',
|
|
'getFocusFootprints',
|
|
]);
|
|
|
|
export function requireFeatureSource(source) {
|
|
for (const method of FEATURE_SOURCE_METHODS) {
|
|
if (typeof source?.[method] !== 'function')
|
|
throw new TypeError('Missing feature operation: ' + method);
|
|
}
|
|
return source;
|
|
}
|