Source classes
new Source(props)— imagery;tileUrl(z, x, y),load(tile).new ElevationSource(props)— elevation;tileUrl(z, x, y),load(tile),decode(r, g, b);decodeTerrarium,decodeMapbox.new BuildingSource(props),new RoadSource(props),new WaterSource(props),new VegetationSource(props)— features read throughbuildingSchema,roadSchema,waterSchema,vegetationSchema;load(tile),tiles. All areTileFeatureSources.new VectorTiles(props)— a vector tile provider (api,urlortilejson,schema);load(tile)→VectorTileDatawithlayer(name);VectorTiles.preset(api, token?)is the instance layers share.new Overpass({ endpoint? })—query(ql, signal), one request at a time per endpoint.
All take the props shown in Sources; Map, Buildings, Roads and the others also take the props directly.
A FeatureSource — what your own layers take — is any object with minZoom, maxZoom, attribution? and load(tile) returning the features of a tile; tile is { z, x, y, signal }.