mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
refactor: separate map feature queries and source records
This commit is contained in:
1 parent
a8125ad917
commit
bf1d50f29b
28 files changed
+1128
-675
No files matched your search
@@ -0,0 +1,20 @@
|
||||
/** 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;
|
||||
}
|
||||
Reference in new issue
Block a user