refactor(installations): inject engine renderer adapter

This commit is contained in:
German Khokhlov committed 2026-10-28 09:54:05 +04:00
1 parent f4f0088814
commit 965a82144c
7 files changed
+96 -24

No files matched your search

+9
View File
@@ -43,6 +43,14 @@ export function createModel({ state: layerState, services, parts, source }) {
return rgbaFromCss(COLOR_BY_CLASS[record.class] || '#9ca6b0');
}
function installationSurfaceHeightM(record) {
const floor = services.ground?.cachedGroundFloor?.(
record?.latitude,
record?.longitude,
);
return services.ground?.floorAltitudeM?.(null, floor) ?? 0;
}
/**
* Classify a Places text-search result without turning a name match into a
* mapped military-land claim. Google currently has no documented military
@@ -144,6 +152,7 @@ export function createModel({ state: layerState, services, parts, source }) {
return {
approximateSurfaceDistanceM,
colorFor,
installationSurfaceHeightM,
classifyGoogleMilitaryPlace,
installationSourceLabel,
installationWithinViewport,