Skip to content

Locations

3 min read · By Stefan Köhn

The location module answers two questions about a record: where something lies and how big it is. There are two field types for that, the address and the area, and a map underneath both.

Address and area

The address says where something is: street, town, country, and the coordinates too if the source sends them. The area says how big it is and which outline was meant, as a closed ring of corners. You create both in field management like any other field.

When a map appears

When the module is booked and the value can be drawn: an area with at least three corners, or an address with coordinates. An address made of street and town alone stays a line of text. Nor is it resolved after the fact, because a map showing a guessed point is worse than no map.

The address with its point on top, the area with its outline below. The size sits above the map, the attribution inside it.
The address with its point on top, the area with its outline below. The size sits above the map, the attribution inside it.

The map shows, it does not let you draw

An area is drawn where it comes into being, in the prospect's own form. On the record it sits beside the field, read-only. Zooming and panning work, with the buttons or with the arrow keys once the map has focus. A drawing tool owes the same keyboard operation, and that comes with the next stage.

Stored in square metres, shown in your unit

On the field you set what you compute in: square metres, hectares, square feet or acres. Storage is always in square metres so that two records stay comparable. That is why the unit can be switched at any time without a single value being touched.

Filtering like any other number

Greater than, between, empty. The filter asks in the unit of the field and does the conversion itself. That also lets a distribution rule be set on a minimum size without anyone sitting there with a calculator first.

Without the module the values stay

Address and size belong to the record, not to the module. If it is cancelled they remain readable, filterable and exportable. Only the maps are gone.

Step by step

  1. Open Settings, entities and the fields of the entity in question.
  2. Create a field of type address or area.
  3. For an area: pick the unit you compute in.
  4. Open a record that carries a value in it. The map sits under the field.

Where does the map image come from?

From OpenStreetMap. The attribution at the bottom right is part of the licence and therefore stays.

Can one record carry several locations?

Yes, as many as the entity has fields for. Each field brings its own map.

There is an address but no map. Why?

Because it has no coordinates. Those come along if the source sends them. An address is not resolved after the fact.

Does the module slow pages down?

Only where a map actually appears. The map library is fetched when one is created; a record without a location field loads none of it.

Can I search by radius?

Not yet. Today you filter on the fields of the address, by postcode or town for instance. A search within a radius around a point comes with the next stage.