# Locations, geofences, and tags

Model reusable places, independent radial or polygon boundaries, and optional app-defined workflow tags.

Source: https://appportal.io/docs/concepts/locations-geofences-and-tags

AppPortal keeps **locations** and **geofences** related but distinct. A location is
the durable place in your catalog. A geofence is an independently managed boundary
that an app may use around or near that place.

This separation lets a team build the place catalog first, then add only the
boundaries its workflows actually need.

## A location is the reusable place

A location has a name, map coordinate, optional address, and app/environment
scope. It can represent a store, campus, depot, venue, trailhead, or any other site
that matters to the application.

A location may have:

- no geofences while the team is still building its place catalog;
- one geofence for a single arrival or departure workflow; or
- several geofences, each with its own boundary, name, active state, and tags.

Changing how one geofence is used does not require creating a duplicate location.

## A geofence is an independent boundary

A radial geofence is a circle defined by a center point and radius. AppPortal
accepts radial radii from 25 metres through 10 kilometres.

A polygon geofence follows a boundary drawn on the map. Use it when a real area is
not well represented by a circle, such as a parking lot, campus, venue footprint,
service yard, or shoreline property.

The geofence does not have to share the location's exact center. The location is
the catalog anchor; each geofence owns the geometry required by its workflow.

## Tags are optional app vocabulary

Tags are optional labels that the consuming app defines. AppPortal does not
reserve tags such as `arrival`, `pickup`, or `staff-only`, does not add a tag to a
new geofence, and does not assign an action to any tag.

A geofence can have no tags or as many as 20 tags. An app can use them to decide
which geofences to sync for a particular user state or how to interpret a
transition. A single geofence may carry more than one label when several app
workflows share the same boundary.

Tags are normalized as compact identifiers:

- leading and trailing whitespace is removed and values are stored in lowercase;
- the Dashboard converts whitespace to hyphens;
- Unicode letters and numbers are supported, along with `-`, `_`, `.`, and `:`;
- duplicate values are removed; and
- each tag can contain at most 64 characters.

Treat tags as a set; their order has no business meaning. Do not put secrets,
access tokens, email addresses, health information, or other personal information
in a tag. Use opaque, workflow-oriented labels that are safe to expose to the
application.

## Example: grocery pickup and store operations

Suppose a grocery app stores **Riverside Market** as one location. The location is
useful in the catalog even before the team adds a geofence.

Later, the team adds three independently managed boundaries:

1. **Nearby** is a wide radial geofence tagged `discovery`.
2. **Pickup parking** is a polygon tagged `pickup` and `arrival`.
3. **Loading dock** is a polygon tagged `operations` and `staff-only`.

A shopper with an active pickup can sync the pickup boundary. An employee can sync
the operational boundary. Another shopper may use the discovery boundary. Those
decisions belong to the grocery app; the same tag names would have no automatic
meaning in another app, and the tags do not send a message by themselves.

## Find a place without starting from coordinates

When adding a location, search by a place name or address and choose the intended
result. AppPortal fills the candidate name, address, and coordinate for review.
You can also click a point on the map, import a file, or enter exact latitude and
longitude.

Map labels are part of the basemap and are not the saved location record. Confirm
the selected result or coordinate before saving, especially when similarly named
places are close together.

The mouse wheel zooms around the cursor so the point under inspection stays in
context. Drag to pan, and use **Fit** when you want to return to the saved
boundaries.

## Map and Satellite are viewing tools

Use **Map** for roads, labels, and normal place selection. Use **Satellite** when
imagery makes a property line, parking area, building, or shoreline easier to
identify. Changing the basemap does not move a location or alter geofence
geometry.

AppPortal sends map-tile and place-search requests through same-origin server-side
proxies. Upstream provider URLs and access configuration are not sent to browser
code. Search sends the text you submit to the configured Nominatim-compatible
search endpoint; it does not send map bounds or require device geolocation. The
provider attribution may change with the selected basemap or configured search
provider and must remain visible.

Place names and addresses may still be sensitive. Search only for information the
organization is permitted to send to its configured provider, and keep secrets or
personal case details out of the search field.
