Back to Gallery
const map = new maplibregl.Map({
container: "map",
style: {
version: 8,
sources: {
"raster-tiles": {
type: "raster",
tiles: [
"https://mt0.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
"https://mt1.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
"https://mt2.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
"https://mt3.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
],
tileSize: 256,
},
},
layers: [{ id: "raster-layer", type: "raster", source: "raster-tiles" }],
},
});