This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Return URLs of unique WMS servers


serverURLs = servers(layers)



serverURLs = servers(layers) returns the URLs of unique servers associated with Web map service layers, layers.


collapse all

Find the URLs for government servers.

layers = wmsfind('*.gov*','SearchField', 'serverurl');
serverURLs = servers(layers);
sprintf('%s\n', serverURLs{:})  
ans =

Find server URLs that contain temperature layers and return them in a Web Map Service Layers (WMSLayer) object.

temperature = wmsfind('temperature');
serverURLs = servers(temperature);
for k=1:numel(serverURLs)
   querystr = serverURLs{k};
   layers = refine(temperature,querystr, ...
      'SearchFields', 'serverurl');
   fprintf('Server URL\n%s\n', layers(1).ServerURL);
   fprintf('Number of layers: %d\n\n', numel(layers));
Server URL
Number of layers: 2

Server URL
Number of layers: 2

Server URL
Number of layers: 2

Input Arguments

collapse all

Layers to provide server URLs, specified as an array of WMSLayer objects.

Output Arguments

collapse all

URLs of unique servers, returned as a cell array of character vectors.

Introduced in R2009b

Was this topic helpful?