Search the WMS Database for layers and servers that are of interest to you.
Refine your search to include only servers or layers with specified field values.
Update your layer to synchronize your selected layer with the server.
Modify your WMS request to set properties like geographic limits, image dimensions, or background color of the map.
Retrieve your map as a raster image from the server.
Display the map.
Follow the example to learn the basic steps in creating a WMS map.
Search the WMS
Toolbox™ software simplifies the process of WMS map creation by using a
stored database of WMS servers. You can search the database for layers and
servers that are of interest to you. WMS servers store map data in units
called layers. For this example, search for layers that contain the phrase
elevationLayer = wmsfind('etopo1 hillshade');
search. In this example, the
returns only one layer. As a result, you do not need to refine your
layer. Contact the web server identified in the database search
to get the most up-to-date information. The
function accomplishes two tasks:
WMSLayer object to include the
most recent data
Fills in its
elevationLayer = wmsupdate(elevationLayer);
Modify your WMS
request. Create map axes with geographic limits appropriate for
Europe. Then, get the map axes map structure (
which contains the settings for all the current map axes properties. You can
use this struct to modify your WMS request. For example, you can set
geographic limits, image dimensions, background color, and other properties
of the map.
figure worldmap europe mstruct = gcm;
map. Read the layer using the
function. Set the longitude and latitude limit parameters to the current map
[elevationImage,R] = wmsread(elevationLayer,'Latlim', ... mstruct.maplatlimit,'Lonlim',mstruct.maplonlimit);
wmsread function returns a map called
elevationImage and a raster reference object
R, which ties the map to a specific location on
Display the map on the map axes and add a title.