Type Alias ProximityRule
ProximityRule: { maxZoom?: number; minZoom?: number } & (
| { coordinates: Position; type: "fixed" }
| { type: "map-center" }
| { type: "server-geolocation" }
| { cachedLocationExpiry?: number; type: "client-geolocation" } & PositionOptions
)
| { coordinates: Position; type: "fixed" }
| { type: "map-center" }
| { type: "server-geolocation" }
| { cachedLocationExpiry?: number; type: "client-geolocation" } & PositionOptions
)
Type Declaration
OptionalmaxZoom?: numberOptionalminZoom?: numberminimal map zoom for the rule to be used
- { coordinates: Position; type: "fixed" }
coordinates: Position
coordinates of the fixed proximity
type: "fixed"
fixed proximity
- { type: "map-center" }
type: "map-center"
use map center coordinates for the proximity
- { type: "server-geolocation" }
type: "server-geolocation"
resolve proximity by geolocating IP of the geocoding API call
- { cachedLocationExpiry?: number; type: "client-geolocation" } & PositionOptions
OptionalcachedLocationExpiry?: numberhow long should the geolocation result be cached, in milliseconds
type: "client-geolocation"
use browser's geolocation API for proximity. If it fails, following proximity rules are iterated.
maximal map zoom for the rule to be used