You can request data from a WMS server in two ways: either you use a tiled approach, or you request a single image. This tutorial describes how to use the single-image approach. See Differences between WMSImageModel and WMSTileSetModel for more information about the available approaches. |
Visualizing WMS data on a map requires two steps:
-
Create a
WMSImageModel
by connecting to the WMS server. -
Use a
RasterImageLayer
to visualize the model.
WMSImageModel.createFromURL("http://sampleservices.luciad.com/wms", [{layer: "rivers"}])
.then(function(model) {
//Create a layer for the WMS model
const layer = new RasterImageLayer(model);
//Add the layer to the map
map.layerTree.addChild(layer);
});
Use a See Requesting feature information from a WMS service for more information. |