The click sequence
Each thing a person does on the map, the call it makes, and what it costs.
Base URL https://api.offendersearch.appThe sequence
Each row is one thing a person does on your map: what your app calls, what comes back, and what it costs.
| # | The person | Your app calls | We return | Charge |
|---|---|---|---|---|
| 1 | Opens the map: a default view, their location, or a typed address. | viewport with the box | Clusters, pins or named pins for that zoom. | 1 map request |
| 2 | Pans or zooms. | viewport again, once the map settles | The new view. | 1 map request |
| 3 | Hovers a cluster. | Nothing | The count and breakdown are already on the cluster. | Free |
| 4 | Clicks a cluster. | Nothing. Fit the map to the cluster’s bbox at its expansionZoom. That moves the map, which is step 2. | — | Step 2 |
| 5 | Clicks a pin that has no name yet (zoom 13–14). | Your choice: zoom in (step 2), or open the record (step 8). | — | Step 2 or step 8 |
| 6 | Clicks a named pin. | Nothing. The popup uses the label, housing status and photo flag already on the pin. | — | Free |
| 7 | Clicks a pin that stands for several people at one address, or an approximate-area pin. | groups/{groupId} | The people in it, a page at a time: an id and a label each. | 1 map request per page |
| 8 | Clicks “View record”. | records/{markerId} | The complete record, with the photo. | 1 record open |
| 9 | Closes the record and opens it again. | records/{markerId} with the same id | The same record. | Free |
| 10 | Moves the map, comes back, and opens the same person. | viewport, then records/{newId} | New ids, and the record. | 1 map request + 1 record open |
| 11 | Shares or bookmarks a record. | Store the recordRef from step 8. Later: records/{recordRef}. | The record. | 1 record open, then free for 24 hours |
| 12 | Asks to be told when someone moves into this area. | The Monitoring API: POST /v1/monitors with a location. | — | The monitoring price |
The states
Notes on the steps
- Step 2: wait for the map to settle. Call on move end, after a short pause, and cancel the request you no longer need. A drag is then one map request, not one for every frame.
- Step 2: send
If-None-Match. Coming back to a view you already have answers304, which is free. See The viewport request. - Step 4: a cluster never traps the user.
expansionZoomis the zoom at which it becomes smaller clusters, pins, or one many-people pin. - Step 7: the list is paged. Each page is one map request. Members have labels when the pin came from a named view.
- Steps 8 to 10: one charge for each person in each map response. See Open a record.
- Step 12: an area watch is a different product. See location monitoring.
In code
The three library examples run this whole sequence: MapLibre, Leaflet, Google Maps.