To add a raster layer to the map, first copy the uuid of the raster layer from the geobox portal and get the raster layer from the server:
getRater (raster_uuid)
Example:
const rasterLayer = await Server.getRaster('4f9f3e4b-4dc1-469b-83ab-00ae00f02581');
Then add the raster layer to the map as follows.
addRasterLayer(rasterLayer)
Parameters:
rasterLayer is the raster layer that is got from the server.
Returns:
String: Returns a message that shows adding layer was successful or not. Null message means adding was successful.
Example:
const result = await map.addRasterLayer(rasterLayer);
See the Pen Contact Form – Pen a Day 20 by Geobox (@geobox-gl-demo) on CodePen.1