From 023f9c5841a28e1384fc8e29f140646ebe7bc137 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Zbytovsk=C3=BD?= Date: Mon, 7 Oct 2024 13:11:46 +0200 Subject: [PATCH] general: move DOCS to wiki (#644) --- ARCHITECTURE.md | 1 + DOCS.md | 23 ----------------------- README.md | 2 +- 3 files changed, 2 insertions(+), 24 deletions(-) create mode 100644 ARCHITECTURE.md delete mode 100644 DOCS.md diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md new file mode 100644 index 000000000..d60f3829d --- /dev/null +++ b/ARCHITECTURE.md @@ -0,0 +1 @@ +https://github.com/zbycz/osmapp/wiki/Architecture diff --git a/DOCS.md b/DOCS.md deleted file mode 100644 index c00346161..000000000 --- a/DOCS.md +++ /dev/null @@ -1,23 +0,0 @@ -# OsmAPP code concepts - -Last update: 4/2024 - -## Clicking POIs in map - -When clicking a feature on map (`useOnMapClicked`), we only get skeleton. That is a feature without tags, only with a few properties computed by our MVT tiles provider. We get `name`, `class` and `subclass`. - -Note: `class` and `subclass` is used to display icons on the map, and osmapp mirrors this behaviour in `getPoiClass()` so we can generally show the same icons as the webgl map. - -After user clicks a POI on the map, the skeleton is shown immediately in FeaturePanel and loading indicator starts spinning. - -## Fetching features - -This is done by next.js extension `getIntitialProps` on the `App` component. It is run on server-side if correct URL is loaded (SSR), or later in the browser. - -1. getInitialFeature() – special getCoordsFeature() can be dispatched -2. fetchFeature() - gets the data -3. fetchFeatureWithCenter() - - for ways and relations we ask overpass to fill in the `center` prop, so we save some data - - osm data is converted to osmapp `Feature` type by `osmToFeature()` – compatible with GeoJSON spec - - `addSchemaToFeature()` adds the iD presets and fields (we also fetch fresh `fetchSchemaTranslations()`). iD schema is still experimental, if this fails, osmapp will show just tags. -4. `addMembersAndParents()` – currently switched on only for select features diff --git a/README.md b/README.md index 208de2163..fdc0f8a2f 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ You may [add issues](https://github.com/zbycz/osmapp/issues) here on GitHub, or > If you are a JS dev, you may also `git clone` / `yarn` / `yarn dev` \ > Or [open OsmAPP in gitpod](https://gitpod.io/#https://github.com/zbycz/osmapp) or GitHub Codespaces – full dev environment in your browser. \ > If Vercel build fails, please run `yarn build` locally to debug it. \ -> [Architecture DOCS here](./DOCS.md). +> [Architecture DOCS here](https://github.com/zbycz/osmapp/wiki/Architecture). ## Features 🗺 📱 🖥