docs: ka-maps-lou-ka.md — intégration Lou-Ka Maps
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 changed file +36 −0
added
docs/ka-maps-lou-ka.md
+36 −0
@@ -0,0 +1,36 @@ | ||
| 1 | +# Lou-Ka Maps — intégration Ka Maps | |
| 2 | + | |
| 3 | +**Auteur : Simon-Pierre Boucher — contact@spboucher.ai — Groupe Ka / Ka Maps (intégration Lou-Ka)** | |
| 4 | + | |
| 5 | +Lou-Ka consomme le framework partagé `@groupe-ka/ka-maps` | |
| 6 | +(`file:../../ka-maps`, moteur Mapbox GL, style Standard 3D). Voir | |
| 7 | +`~/Desktop/ka-maps/docs/ka-maps.md` pour l'architecture du framework. | |
| 8 | + | |
| 9 | +## Fichiers de l'intégration | |
| 10 | + | |
| 11 | +| Fichier | Rôle | | |
| 12 | +|---|---| | |
| 13 | +| `frontend/src/kamaps/theme.ts` | thème Lou-Ka Maps (encre/lime/vert ; pastilles encre-blanc, sélection lime) | | |
| 14 | +| `frontend/src/kamaps/adapter.ts` | `/api/listings.geojson?bbox=…` → `MapProperty` (kind `listing`, type `rent`) | | |
| 15 | +| `frontend/src/kamaps/config.ts` | jeton public Mapbox (surcharge `VITE_MAPBOX_TOKEN`) | | |
| 16 | +| `frontend/src/components/MapView.tsx` | montage : sync liste↔carte, URL caméra, aperçu React, 3D/2D | | |
| 17 | +| `frontend/src/pages/Home.tsx` | sélection/survol des cartes de liste + recherche debouncée | | |
| 18 | +| `louka/web.py` | `/api/listings.geojson` : `bbox`, `limit`, `totalGeocoded`, `totalMatching` | | |
| 19 | +| `louka/db.py` | index `idx_listings_geo(lat,lng)` (+ `PRAGMA optimize` à l'ingestion) | | |
| 20 | + | |
| 21 | +## Spécificités Lou-Ka | |
| 22 | + | |
| 23 | +- `cluster={{ maxZoom: 15, valueClamp: [250, 8000] }}` : géocodage par | |
| 24 | + immeuble (les logements d'une adresse se superposent) et loyers | |
| 25 | + aberrants (maisons à vendre publiées en location) bornés. | |
| 26 | +- Compat : sans `bbox`, l'endpoint GeoJSON garde son ancien comportement. | |
| 27 | +- « N hors carte » = annonces filtrées sans coordonnées ou hors zone | |
| 28 | + (`totalMatching`) — ~40 % des annonces actives ne sont pas géocodées. | |
| 29 | +- L'app iOS (MapKit) est hors périmètre Ka Maps : elle partage seulement | |
| 30 | + les API. | |
| 31 | + | |
| 32 | +## Vérifier | |
| 33 | + | |
| 34 | +`npm run build` (typecheck+bundle) ; `python run.py serve 8095` puis | |
| 35 | +`/?view=carte` : grappes → zoom → pastilles → clic → aperçu → pan → | |
| 36 | +« Rechercher dans cette zone » → filtre → compteur. | |
| 37 | ||