Documentation

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.

Search for Layers Outside the Database

You can search for layers by using your Web browser rather than by using the WMS Database. For example, this approach allows you to view layers developed more recently than the last software release.

  1. To search for layers outside the WMS Database, use your favorite search engine. If you are using Google®, select Images and enter the following in the search box: getmap wms.

  2. View the images to choose a map. Click the map link and find the WMS GetCapabilities request somewhere on the page. If you cannot find a GetCapabilities request, try another map.

    For this example, the syntax for the URL of the WMS GetCapabilities request appears as follows:

    url = ['http://sampleserver1.arcgisonline.com/' ...
       'ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/' ...
       'MapServer/WMSServer?service=WMS&request=GetCapabilities' ...
       '&version=1.3.0'];
    
  3. After you obtain the URL, you can use wmsinfo to return the capabilities document.

    c = wmsinfo(url);
    
  4. Next, read in a layer and display it as a map.

    [A,R] = wmsread(c.Layer(1), ...
       'BackgroundColor', [0,0,255], 'ImageFormat', 'image/png');
    figure
    usamap(c.Layer(1).Latlim, c.Layer(1).Lonlim)
    geoshow(A,R)
    
Was this topic helpful?