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:

  1. Create a WMSImageModel by connecting to the WMS server.

  2. 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 WMSImageLayer instead of a RasterImageLayer if you need to support getFeatureInfo requests.