refactor: replace Overpass API loader with static venue geometry#228
Open
refactor: replace Overpass API loader with static venue geometry#228
Conversation
The loader queried Overpass on every build for fixed OSM IDs (NTUST relation plus the RB and TR building ways), so the answer never changed — but the API is unstable and currently down, breaking builds. Capture the post-osmtogeojson FeatureCollections once into data/venue-geometry.json and import it from the loader. The osmtogeojson dependency, the runtime fetch, and the network failure mode go away. The loader keeps the same OverpassData shape, so LeafletMap.vue is unchanged.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
4 tasks
pan93412
approved these changes
May 5, 2026
mirumodapon
approved these changes
May 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
osmtogeojsonFeatureCollections from the existing fixed Overpass queries (NTUST campus relation + the RB and TR building ways) into a newdata/venue-geometry.jsonand rewritesloaders/overpass.data.tsto import it.fetchtooverpass-api.deand theosmtogeojsondependency. The loader's exportedOverpassDatashape is unchanged, soLeafletMap.vueis untouched.Why
The OSM IDs we query are fixed, so Overpass returned the same result on every build — but the API is unstable and is currently returning errors, blocking builds. Static data removes the network dependency entirely; refresh instructions for the three OSM objects live in the loader's docstring.
Test plan
pnpm type-checkpasses locallyMultiPolygonvenue feature (國立臺灣科技大學) + 2Polygonbuilding features withname/reftags preserved for tooltips (綜合研究大樓 (RB),研揚大樓 (TR))pnpm devfrom booting — should be exercised in preview)