Skip to main content

Tile Layer

The tile layer is used with the standalone adapter to add raster tile basemaps to visualizations.

This approach doesn't use any external dependencies or third party basemap libraries. It only needs a connection to a tile server, which can also be hosted offline if required.

mapweave.addLayer(
new TileLayer({
data: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
options: {
attribution:
'<a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap</a>',
},
}),
);

Tile layer supports raster tiles only.

See the Standalone Adapter example to learn more.