refactor: separate map feature queries and source records

This commit is contained in:
Sameh Khamis committed 2026-09-15 08:10:32 -07:00
1 parent a8125ad917
commit bf1d50f29b
28 files changed
+1128 -675

No files matched your search

+20
View File
@@ -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;
}