Package-level declarations
Types
UserGeometry contains all of the data relating to the location and motion of the user. It's aim is to reduces the number of arguments to many of the API calls and to concentrate some of the logic around heading choice.
Properties
The zoom level and grid size were constant when using soundscape-backend at 16 and 3 respectively. With protobuf tiles the tile grid for walking around will be 15 and 2, but we can also have a lower zoom level to allow us to give better context when we're travelling by faster means of transport e.g. inter city train. The lower zoom levels mean that we can search for the nearest village or town instead of just the nearest street or road.
The default tile server is the one out in the cloud where the tile JSON is at: https://server/protomaps.json
Functions
Reverse geocodes a location into 1 of 4 possible states
getNameForFeature returns text describing the feature for callouts. Usually it returns a name or if it doesn't have one then a localized description of the type of feature it is e.g. bike parking, or style. Some types of Feature have more info e.g. bus stops and railway stations
The protomaps tile server responds with an HTTP 204 (No Content), and no body, for tiles that have no data at all, e.g. remote areas with no OSM features nearby. Note this is not the same as a tile that's entirely open sea, or one with a layer present but no features in it - those are still served normally with an HTTP 200. Retrofit special cases a 204/205 response and always returns a null body for it, even though the tile request itself succeeded, so that has to be turned back into an empty VectorTile here rather than being treated as a failed request that's worth retrying.