Type Alias ProximityRule

ProximityRule: { maxZoom?: number; minZoom?: number } & (
    | { coordinates: Position; type: "fixed" }
    | { type: "map-center" }
    | { type: "server-geolocation" }
    | { cachedLocationExpiry?: number; type: "client-geolocation" } & PositionOptions
)

Type Declaration

  • OptionalmaxZoom?: number

    maximal map zoom for the rule to be used

  • OptionalminZoom?: number

    minimal 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?: number

      how 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.

Was this helpful?

SDK JS
Modules
Reference
types
ProximityRule