-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Overview:
Get rid of "zoom in" limit. No zoom logic. Two queries at a time: one for markers and one for List.
More details
Use the within_bounding_box?no_details=2 endpoint to populate the map markers. This endpoint returns only:
- location ID
- location name
- location lat
- location lon
- num_machines
Then, for the List, we use a paginated endpoint, within_bounding_box?no_details=1;limit=50
Full example endpoint: https://pinballmap.com/api/v1/locations/within_bounding_box.json?swlat=34.03303087144905;swlon=-118.28017417341471;nelat=34.19971296454513;nelon=-118.17717399448156;limit=5
This endpoint, at the bottom of the results, includes pagy fields that we can use for creating and using navigation buttons.
For sorting the List, the sort button does a new query. Include order_by= in the query. Possible options are: updated_at, name, machine_count, id default is id
Need to account for:
- The "filter by machines shown on the map" option.
Marker clicks can still show the bottom sheet.
Let's look into the location details (at least enough for the bottom sheet) being requested when a marker is clicked. We might need to make a new locations endpoint that is specific for the bottom sheet (for example, only returns the shown fields, including only the top 5 machines and not all machine IDs).