disp

Class: WMSLayer

Display properties

Syntax

disp(layers,Name,Value,...)

Description

disp(layers,Name,Value,...) displays the index number followed by the property names and property values of layers, a Web Map Service Layer object (WMSLayer). You can specify additional options using one or more Name,Value pair arguments.

Input Arguments

expand all

layers — Web Map Service layersWeb Map Service Layer (WMSLayer) object

Web Map Service layers, specified as a Web Map Service Layer (WMSLayer) object.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

You can abbreviate parameter names, and case does not matter.

'Properties'

String or cell array of strings that determines which properties appear as output and the order in which they appear. Permissible values are: 'servertitle', 'servername', 'layertitle', 'layername', 'latlim', 'lonlim', 'abstract', 'coordrefsyscodes', 'details', or 'all'. To list all the properties, set 'Properties' to 'all'.

Default: 'all'

'Label'

A case-insensitive string with permissible values of 'on' or 'off'. If you set 'Label' to 'on', then the property name appears followed by its value. If you set 'Label' to 'off', then only the property value appears in the output.

Default: 'on'

'Index'

A case-insensitive string with permissible values of 'on' or 'off'. If you set 'Index' to 'on', then WMSLayer.disp lists the element's index in the output. If you set 'Index' to 'off', then WMSLayer.disp does not list the index value in the output.

Default: 'on'

Examples

expand all

Display Specific Properties of WMSLayer Object

Display LayerTitle and LayerName properties to the command window without an Index.

layers = wmsfind('srtm30');
disp(layers(1:5),'Index', 'off', ...
   'Properties',{'layertitle','layername'});
  5x1 WMSLayer

  Properties:
      LayerTitle: 'Topography, SRTM30+ Version 1.0, 30 arc second, Global - topo'
       LayerName: 'usgsCeSrtm30v1:topo'

      LayerTitle: 'Topography, SRTM30+ Version 6.0, 30 arc second, Global - topo'
       LayerName: 'usgsCeSrtm30v6:topo'

      LayerTitle: 'SRTM30 with Bathymetry (900m) merged with global ASTER (30m)'
       LayerName: 'EarthAsterElevations30m'

      LayerTitle: 'SRTM30 with Bathymetry (900m) merged with global ASTER (30m) and USGS NED (10m)'
       LayerName: 'mergedAsterElevations'

      LayerTitle: 'SRTM30 with Bathymetry (900m) merged SRTM3 V4.1 (90m) and USGS NED (10m)'
       LayerName: 'mergedElevations'

Sort and Display Property of WMSLayer Object

Sort and display the LayerName property with an index.

Retrieve the layers.

layers = wmsfind('elevation');

Sort the layers.

[layerNames, index] = sort({layers.LayerName});

Display as a sample the first five results.

layers = layers(index);
disp(layers(1:5),'Label','off', 'Properties', 'layername');
  5x1 WMSLayer

  Properties:
           Index: 1
'0'

           Index: 2
'10003_1'

           Index: 3
'10008_1'

           Index: 4
'10008_2'

           Index: 5
'1005_5'

See Also

Was this topic helpful?