To add a raster or mosaic layer to the map, you must use the leaflet library. As mentioned earlier, you access the leaflet library using the L variable.

First, copy the XYZ URL or WMTS URL from the geobox portal or any other sources. Then add to the map as follows.

var rasterLayer = L.tileLayer('https://api.geobox.ir/v1/rasters/41dcc205-c540-4631-99c7-0ac78954/tiles/{z}/{x}/{y}.png?apikey=CI5GdCMXb46_GMK3HkSSSsb5InJZs5KYkhFfrIViNKc');
rasterLayer.addTo(map.Lmap);

You can also use the leaflet guide for more guidance.

See the Pen Contact Form – Pen a Day 20 by Geobox (@geobox-gl-demo) on CodePen.1

Leave a comment

Your email address will not be published. Required fields are marked *