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
We're going to round metric as documented for iOS: For metric units, we round all distances less than 1000 meters to the nearest 5 meters and all distances over 1000 meters to the nearest 50 meters.
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
Reverse geocodes a location into 1 of 4 possible states