{% load i18n %} {% comment %} Reusable polygon picker component. Renders a MapLibre map with a simple click-to-draw polygon tool. Each click adds a vertex; clicking the first vertex (or the Finish button) closes the polygon. The resulting GeoJSON is written to id_geom_geojson. If the form already has a geometry (edit mode), it is displayed on the map and the user can redraw it. Required context: form (must have geom_geojson field) JS initialisation: call window.initLocationPickerMap() after injecting this HTML into the DOM (handled by location_edit_modals.html). {% endcomment %} {# Hidden geom_geojson input – submitted with the form; JS writes to it. #}