You can visualize data from OGC web services in LuciadRIA, but it also allows you to access the capabilities of a web service. The capabilities of a service are the result of a GetCapabilities request.

When you create a model or store for an OGC service, these capabilities are automatically retrieved to negotiate the version and determine the request parameters. Because these capabilities also include general information about the service and the available data, you can access them through the API:

  • For WMTS, use WMTSCapabilities.fromURL

  • For WMS, use WMSCapabilities.fromURL

  • For WFS, use WFSCapabilities.fromURL

In the following example, the capabilities are retrieved for a WMS service, and those capabilities are used to create a model and layer.

const capabilitiesPromise = WMSCapabilities.fromURL("http://sampleservices.luciad.com/wms");
capabilitiesPromise.then(function(capabilities) {
  //Create a model using the capabilities
  const model = WMSTileSetModel.createFromCapabilities(capabilities, [{layer: "rivers"}]);
  //Create a layer for the WMS model
  const layer = new RasterTileSetLayer(model);
  //Add the layer to the map
  map.layerTree.addChild(layer);
});