XYZ Maps Documentation
    Preparing search index...

    Class TileProviderAbstract

    The TileProvider is an abstract Provider that serves map data partitioned into Tile instances.

    Hierarchy (View Summary)

    Index
    id?: string

    The id of the Provider

    margin?: number = 0

    default tile margin.

    name?: string

    The name of the Provider.

    • Add an EventListener to the provider. Valid events: "clear" and "error"

      The detail property of the Event gives additional information about the event. detail.provider is a reference to the provider onto which the event was dispatched and is set for all events.

      Parameters

      • type: string

        A string representing the event type to listen for

      • listener: (e: CustomEvent) => void

        the listener function that will be called when an event of the specific type occurs

      • Optional_c: any

      Returns boolean

    • Clears the given tile(s) from the provider's cache.

      Parameters

      • tiles: Tile | Tile[]

        A single Tile or an array of Tiles to be cleared.

      Returns void

    • Clears all tiles within a specified geographical bounding box.

      Parameters

      • bbox: GeoJSONBBox

        An array of geographical coordinates [minLon, minLat, maxLon, maxLat] defining the rectangular area from which tiles will be cleared.

      Returns void

    • Clears all cached tiles of the provider.

      Returns void

    • Clears the given tile(s) from the provider's cache.

      Parameters

      Returns string[]

    • Get or set configuration options for the provider.

      If a string is provided as the first argument, returns the value of the corresponding property. If an object is provided, sets the provider's properties according to the object.

      Parameters

      • options: string | TileProviderOptions

        The configuration key as a string to get a value, or an object to set multiple options.

      • Optionalvalue: any

        Optional value to set if a string key is provided.

      Returns TileProviderOptions

    • Create a new Tile.

      Parameters

      • quadkey: string

        the quadkey of the tile to create

      Returns Tile

    • Get a locally cached tile by quadkey.

      Parameters

      • quadkey: string

        the quadkey of the tile

      Returns Tile

    • Retrieves cached tiles within a specified bounding box or all cached tiles if no parameters are provided.

      If no arguments are passed, all cached tiles are returned. If a bounding box (bbox) and/or zoom level (zoomlevel) are provided, it filters the cached tiles based on the specified area and zoom level.

      Parameters

      • Optionalbbox: number[]

        An optional array of coordinates defining the bounding box in the format: [minLon, minLat, maxLon, maxLat]. If provided, only tiles within this geographic area will be returned.

      • Optionalzoomlevel: number

        An optional zoom level to filter tiles. If provided, only tiles at the specified zoom level will be returned.

      Returns Tile[]

      • An array of Tile objects that match the specified parameters, or all cached tiles if no parameters are given.
    • Get a tile by quadkey.

      Parameters

      • quadkey: string

        quadkey of the tile

      • callback: (tile: Tile, error?: any) => void

        the callback function

      Returns any

      the Tile is returned if its already cached locally

    • Remove an EventListener from the provider. Valid events: "clear" and "error"

      Parameters

      • type: string

        A string which specifies the type of event for which to remove an event listener.

      • listener: (e: CustomEvent) => void

        The listener function of the event handler to remove from the provider.

      • Optional_c: any

      Returns boolean

    • Set the tile margin in pixel.

      Parameters

      • tileMargin: number = 0

        the tileMargin

      Returns void