Area
Pro
Area stores a shape that editors draw on a map by placing points: the boundary of a park, a delivery zone, the region a service covers. It isn't an address; use Location for that.
Settings
- Geometry type: Polygon for a single shape, or Multi-polygon for several separate shapes, like a service area made of two districts.
- Allow holes: let editors cut holes out of a shape, like a lake inside a park.
- Max vertices: the most points allowed across all shapes, 100 by default. Detailed shapes imported from GeoJSON can be simplified in the editor to fit.
A shape with more points than allowed can't be saved; the rest of the form still saves.
Using it
VX calculates useful numbers from the shape, and you can display them with dynamic tags:
- the area in square meters
- the perimeter in meters
- the center point
- the bounding box (south-west and north-east corners)
The raw shape isn't available in dynamic tags. To draw it on the front end, read the value in PHP or through the REST API, which returns it as GeoJSON and accepts GeoJSON when writing.
Technical details for LLMs
- Type key:
area(Pro). Settings:geometry_type(polygon|multipolygon),allow_multiple_rings(holes; default false),max_vertices(≥ 3, default 100 when null, hard ceiling 10,000 viavxframework/geo/area_absolute_max_vertices). - Stored: GeoJSON-style geometry in meta. Exceeding
max_verticesis a hard error (value not saved). - Dynamic data: derived only —
area_m2,perimeter_m,centroid.{lat,lng},bounds.sw.{lat,lng},bounds.ne.{lat,lng}. REST and abilities read and write the GeoJSON (type,coordinates,label) with the metrics alongside, read-only.