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 tiled approach. See Differences between WMSImageModel and WMSTileSetModel for more information about the different approaches. |
Visualizing WMS data on a map requires two steps:
-
Create a
WMSTileSetModel
by connecting to the WMS server. -
Use a
RasterTileSetLayer
to visualize the model.
WMSTileSetModel.createFromURL("https://sampleservices.luciad.com/wms", [{layer: "rivers"}])
.then(function(model) {
//Create a layer for the WMS model
const layer = new WMSTileSetLayer(model);
//Add the layer to the map
map.layerTree.addChild(layer);
});
Use a See Requesting feature information from a WMS service for more information. |