@three-tile/lib
    Preparing search index...

    Class TileSource

    Base class for data sources, users can customize data sources by inheriting this class

    Implements

    Indexable

    • [key: string]: unknown

      Any data

    Index

    Constructors

    Properties

    _projectionBounds: [number, number, number, number] = ...

    Projected data bounds

    attribution: string = "ThreeTile"

    Copyright attribution information for the data source, used for displaying map copyright notices

    bounds?: [number, number, number, number]

    Data bounds in format [minLon, minLat, maxLon, maxLat]. Default is undefined

    dataType: string = "image"

    Data type that determines which loader to use for loading and processing data. Default is "image" type

    isTMS: boolean = false

    Whether to use TMS tile coordinate system. Default false uses XYZ system, true uses TMS system

    maxLevel: number = 18

    Maximum zoom level supported by the data source. Default is 18

    minLevel: number = 0

    Minimum zoom level supported by the data source. Default is 0

    opacity: number = 1.0

    material opacity. Range 0-1, default is 1.0 (completely opaque)

    projectionID: ProjectionType = "3857"

    Data projection type. Default is "3857" Mercator projection

    subdomains: string | string[] = []

    List of URL subdomains for load balancing. Can be an array of strings or a single string

    transparent: boolean = true

    Whether the material is transparent. Default is true (transparent)

    url: string = ""

    URL template for tile data. Uses variables like {x},{y},{z} to construct tile request URLs

    Methods

    • Get url from tile coordinate, public, overwrite to custom generation tile url from xyz

      Parameters

      • x: number

        tile x coordinate

      • y: number

        tile y coordinate

      • z: number

        tile z coordinate

      • Optionalobj: { [name: string]: any }

      Returns string | undefined

      url tile url

    • Create source directly through factoy functions.

      Parameters

      Returns TileSource

      ISource data source instance