Skip to content

Feat 3d terrain buildings#290

Draft
Momototoro wants to merge 9 commits into
FixMyBerlin:developfrom
Momototoro:feat-3d-terrain-buildings
Draft

Feat 3d terrain buildings#290
Momototoro wants to merge 9 commits into
FixMyBerlin:developfrom
Momototoro:feat-3d-terrain-buildings

Conversation

@Momototoro

Copy link
Copy Markdown
Collaborator

Hier Nummer 2

https://github.com/FixMyBerlin/private-issues/issues/3303

PR Review: feat-3d-terrain-buildings

Branch Summary

  • Base Branch: develop
  • Commits: 4
  • Core Changes: This PR adds 3D terrain and buildings to the map viewport, and introduces a client-side elevation profile (Höhenprofil) inside the sidebar inspector.

Changed Files (6 total)

File Status Description
RegionMap.tsx Modified Enbles 3D terrain (MapTiler DEM), 3D buildings (fill-extrusion), drag-rotate, and the compass UI.
InspectorFeatureElevationProfile.tsx New Implements client-side Mapterhorn DEM tile sampling with bilinear interpolation, SVG chart rendering, and hover tooltip.
InspectorFeatureTilda.tsx Modified Embeds the new elevation profile component inside a <Disclosure title="Höhenprofil"> for LineString and MultiLineString features.
byTableName.gen.ts Modified Auto-generated topic docs (rebuild).
inspectorDescriptions.gen.ts Modified Auto-generated topic docs (rebuild).
masterportalByTableName.gen.ts Modified Auto-generated topic docs (rebuild).

@Momototoro Momototoro requested a review from tordans June 8, 2026 10:02
Comment on lines +173 to +182
// 1. 3D-Gelände (DEM) hinzufügen mit dem vorhandenen MapTiler Key
map.addSource('maptiler-terrain', {
type: 'raster-dem',
url: `https://api.maptiler.com/tiles/terrain-dem/tiles.json?key=ECOoUBmpqklzSCASXxcu`,
tileSize: 256,
})
map.setTerrain({ source: 'maptiler-terrain', exaggeration: 1.5 })

// 2. 3D-Gebäude aus den Vektorkacheln extrudieren (wird ab Zoom-Stufe 15 sichtbar)
map.addLayer({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -287,7 +316,7 @@ export const RegionMap = () => {

<Search />

<NavigationControl showCompass={false /* TODO: See Story */} visualizePitch={true} />
<NavigationControl showCompass={true /* TODO: See Story */} visualizePitch={true} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<NavigationControl showCompass={true /* TODO: See Story */} visualizePitch={true} />
<NavigationControl showCompass={true} visualizePitch={true} />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compass: Check…

Comment on lines +55 to +59
{geometry && (geometry.type === 'LineString' || geometry.type === 'MultiLineString') && (
<Disclosure title="Höhenprofil">
<InspectorFeatureElevationProfile feature={feature} />
</Disclosure>
)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Einen Component
  • Innen: early return guard null (const visible=COND)

@@ -270,7 +299,7 @@ export const RegionMap = () => {
onData={startMapDataLoading}
onIdle={finishMapDataLoading}
doubleClickZoom={true}
dragRotate={false}
dragRotate={true}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UX: Nur conditional an, wenn 3D an?

capacity: 'Geschätzte oder explizit erfasste Anzahl von Stellplätzen.',
capacity_source: 'Herkunft der Stellplatzanzahl inklusive Schätz- oder Umverteilungslogik.',
orientation: 'Ausrichtung der Fahrzeuge im Straßenland zur Verkehrsrichtung.',
staggered:
'Besondere Merkmale zur Parkweise, insbesondere bei alternierendem/versetztem Parken auf Fahrbahnen, die zu schmal sind um auf beiden Seiten gleichzeitig zu parken, keine Markierungen und Beschilderungen aufweisen, die das Parken regeln und auf denen gewöhnlich wechselseitig abschnittsweise auf der einen oder anderen Straßenseite geparkt wird oder geparkt werden kann.',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO @tordans Reihenfolge muss statisch sein.

return null
}

if (elevationData.length === 0) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was ist denn wenn leer und not loading? => Error case Message

) : null
}

// --- SVG Scaling & Math ---

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract

// Statistics calculation
let climb = 0
let descent = 0
for (let i = 1; i < elevationData.length; i++) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for-of?


return (
<div className="flex flex-col gap-2.5 rounded-lg border border-gray-200 bg-gray-50/30 p-3">
{/* biome-ignore lint/a11y/noStaticElementInteractions: Hover tracking on container */}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nach rebase oxlint

)}
</div>

{/* Summary Statistics */}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helper Component

@tordans tordans marked this pull request as draft June 23, 2026 09:02
@Momototoro Momototoro force-pushed the feat-3d-terrain-buildings branch 2 times, most recently from 5752ee3 to 4423d4e Compare July 1, 2026 08:13
@Momototoro Momototoro force-pushed the feat-3d-terrain-buildings branch from 4423d4e to d5b6356 Compare July 5, 2026 15:49
@tordans

tordans commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants