You can visualize data from OGC web services in LuciadRIA, but you can also 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, you retrieve these capabilities automatically 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

This example shows how to retrieve the capabilities of a WMS service, and how to use those capabilities to create a model and layer.

const capabilitiesPromise = WMSCapabilities.fromURL("");
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 WMSTileSetLayer(model);
  //Add the layer to the map