Zone
Configuration reference: Zona
Overview
The Zone component stores an area on a map: a polygon or a circle, drawn by hand. A table with a Zone column (for example «Zonas», one row per delivery zone) serves two purposes: the Map view of another table draws those zones under its markers, and the ZONE function of a Formula tells which zone each record falls in.
Drawing the zone
In the form, the field shows a thumbnail and a summary («Polígono · 5 vértices», «Círculo · 2,5 km»). The map button opens the editor:
- Polígono: tap the map to place each vertex. With three or more, tap the first vertex or Fechar polígono. Drag a vertex to adjust it.
- Círculo: tap the map to place the centre, drag it to adjust it and pick the Raio, from 50 m to 50 km.
- Desfazer removes the last vertex (or reopens a closed polygon); Recomeçar clears the drawing.
- The colour next to the tools is this zone's colour; Cor da coluna uses the colour set on the column.
- Pesquisar morada ou lugar centres the map on the chosen result, without drawing anything.
Usar esta zona saves; the field's Limpar button clears the zone. A zone with holes or several parts, written by the API or by an automation, shows in the editor but cannot be edited there: Recomeçar lets you draw another one in its place.
Configuration
| Setting | Description |
|---|---|
| Cor | The colour of zones that were not given their own colour in the editor. Default: blue. |
| Preenchimento | The opacity of the colour inside the zone, from 5 % to 80 %. Default: 20 %. |
| Contorno | The width of the line around the zone, from 1 to 6 pixels. Default: 2. |
| Pesquisar moradas | Offers address search to centre the map. Default: on. |
| Centro inicial and Aproximação | Where the editor opens when the cell is empty. Default: mainland Portugal. |
Display in views
| View | Display |
|---|---|
| Form | The thumbnail, the summary and the map and clear buttons |
| Table / Kanban / List / Cards / Calendar | The thumbnail and the summary; tapping shows the zone on a map |
| Export, grouping and sorting | The summary, for example «Círculo · 2,5 km» |
A Zone column never serves as the row title: the zone's name comes from another column of the same table, such as a «Nome» text field.
Filters
A Zone column filters by Vazio and Não vazio. To filter records by the zone they fall in, use a Formula with ZONE and filter by its value.
Stored value
JSON text. A polygon is a GeoJSON Polygon (or MultiPolygon) with coordinates as [longitude, latitude] and every ring closed (the last point repeats the first, with at least three vertices); a circle has a center and a radiusM in metres. The color is optional and uses a palette name: red, orange, amber, green, teal, blue, indigo, purple, pink or slate.
{"type": "Polygon", "coordinates": [[[-9.15, 38.70], [-9.13, 38.70], [-9.13, 38.72], [-9.15, 38.70]]], "color": "green"}
{"type": "circle", "center": {"lat": 41.15, "lng": -8.61}, "radiusM": 2500}
Through the API, send this JSON as text. Polygons that cross the 180° meridian are not supported.