[18.0][ADD] web_widget_mapbox: Mapbox map form widget - #478
Conversation
f7335d7 to
adb3231
Compare
Integrators needed a Community form widget that renders Mapbox from a JSON payload without vendoring GL JS or sharing Enterprise web_map's token field. Task 5602 Co-authored-by: Cursor <cursoragent@cursor.com>
ef4f59c to
7623d18
Compare
|
Hey @etobella @rvalyi @pedrobaeza I know this is not in the /web repo, yet it's a widget, so it might deserve your attention 😄 |
|
If it doesn't depend on anything of geoengine as I see in the manifest, it should go to OCA/web. |
@pedrobaeza |
|
Can you include some kind of demo views to try the module? |
This will require to add some models as well. However I can do a tiny web_widget_mapbox_demo module, let me know this wokrs for you. |
|
I was thinking in doing it in |
|
Yup, I thought about base and res.partner first as well, however we need some fields to store coordinates. Let me check what's would be the best solution here. |
Summary
widget="mapbox"onfields.Json) that renders markers from a JSON payload with Mapbox GL JS loaded from the CDN (v3.30.0), not vendored.web_widget_mapbox.token/ sessionmapbox_token) so this addon can sit next to Enterpriseweb_mapwithout sharingmap_box_token.updated, Map/Satellite styles, zoom/pan/pitch/ fullscreen flags, and a popup form whenclickable+rec_model+rec_idare set.Test plan
web_widget_mapboxon Community 18.0.pk.token and save.<field name="…" widget="mapbox"/>on a Json field and confirm the map renders; computed non-stored Json still displays.default_centerwhen valid, else the first pin; zoom/pan/pitch/fullscreen followallow_*.editablemarker and confirmupdatedis upserted without rewritingelements.clickable+rec_model+rec_idand confirm a form dialog opens (not the main action stack).mapbox_token.NB: this code was written using AI-assistance (Cursor), however was checked manually from A to Z. Yup, AI is a reality, just need to keep it under control 😄
Some screenshots from the real project running in prod.


Task 5602