mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-18 01:02:23 +00:00
refactor(installations): inject engine renderer adapter
This commit is contained in:
1 parent
f4f0088814
commit
965a82144c
7 files changed
+96
-24
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user