Playbook
Circle Geofence Math on the Map (Circle Geofence Math On The Map)
Circle Geofence Math on the Map — a production lesson from logistics operations platforms.
Fleet Wait Geofence
Part 3 of 8
A series on building waiting-vehicle truth from telemetry feeds and circle geofences on the map.
Circle Geofence Math on the Map
Draw the circle in meters: convert kilometer metrics from the API, show radius/area in the popup for operators.
L.circle(center, { radius: km_metric * 1000 })
Kilometreyi metreye çevirmek kontratın parçasıdır.
Concepts, defined where they first appear
📦 Geofence
A geographic boundary on the map; for circles: center + radius.
📦 Telematics Feed
External source of vehicle position and ignition signals.
📦 km_metric
Radius in kilometers from the API; converted to meters on the map.
📦 Operational State
The waiting state operators decide — distinct from raw GPS.
Teams that blur these concepts confuse UI state with integration truth.
Shape of the problem
Draw the circle in meters: convert kilometer metrics from the API, show radius/area in the popup for operators.
L.circle(center, { radius: km_metric * 1000 })
The split that works
Kilometreyi metreye çevirmek kontratın parçasıdır.
L.circle(center, { radius: km_metric * 1000 })
↓
explicit contract
Where production breaks
Incidents grow when radius, identity, or deploy assumptions stay implicit. Make the contract visible and reversible.
The mappings that get confused most often
❌ One app is always safer
✓ Without clear boundaries, one app is more fragile
❌ Keep config hardcoded
✓ Radius, remote URLs, and expose paths are operational contracts
❌ Vendor/API truth is UI state
✓ Vendor feed is evidence; ops state is a decision
A checklist for auditing your own system
- Write the ownership boundary for this surface in one sentence.
- If this contract changes, who deploys?
- On timeout or vendor delay, what does the UI show?
- Do you test embedded and standalone paths separately?
- Deny-list check: any vendor/domain leakage in copy?
What to take away from this part
- Contracts must be visible: expose paths, radius, ticket state, or remote URLs.
- The gap between UI and external systems is a design choice, not a bug.
- Independent deploy means independent rollback.
The boundary you hide will find you in production.
FAQ
Frequently asked questions
What is Geofence?
A geographic boundary on the map; for circles: center + radius.
What is Telematics Feed?
External source of vehicle position and ignition signals.
Is it true that "One app is always safer"?
Without clear boundaries, one app is more fragile
What does this part lock in?
Kilometreyi metreye çevirmek kontratın parçasıdır. Draw the circle in meters: convert kilometer metrics from the API, show radius/area in the popup for operators.
Engineering Principles Learned
- Ownership and release boundaries are as real as the domain model.
- External systems produce evidence; operational state is decided by you.
- Version the contract; keep internals free to move.
Continue reading
Continue reading
Next in series
Configurable Radius Instead of Magic Numbers
Configurable Radius Instead of Magic Numbers — a production lesson from logistics operations platforms.
Next in series
Telemetry Feed vs Operational State
Telemetry Feed vs Operational State — a production lesson from logistics operations platforms.
Same series
Why Waiting Vehicles Need Geofence Truth
Saying a vehicle is 'waiting' is not a GPS pin. Without a circle boundary and operational state, the map lies.