Add a map layer from the Open Geospatial Consortium (OGC)
atlas.layer.OgcMapLayer class can overlay Web Map Services (WMS) imagery and Web Map Tile Services (WMTS) imagery on the map. WMS is a standard protocol developed by OGC for serving georeferenced map images over the internet. Image georeferencing is the processes of associating an image to a geographical location. WMTS is also a standard protocol developed by OGC. It's designed for serving pre-rendered and georeferenced map tiles.
The following sections outline the web map service features that are supported by the
Web Map Service (WMS)
The service must support the
EPSG:3857projection system, or handle reprojections.
GetFeatureInfo requires the service to support
EPSG:4326or handle reprojections.
Operation Description GetCapabilities Retrieves metadata about the service with the supported capabilities GetMap Retrieves a map image for a specified region GetFeatureInfo Retrieves
feature_info, which contains underlying data about the feature
Web Map Tile Service (WMTS)
Tiles must be square, such that
TileWidth == TileHeight.
TileMatrix identifier must be an integer value that corresponds to a zoom level on the map. On an azure map, the zoom level is a value between
"0"is supported, but
Operation Description GetCapabilities Retrieves the supported operations and features GetTile Retrieves imagery for a particular tile
Overlay an OGC map layer
url can be the base URL for the service or a full URL with the query for getting the capabilities of the service. Depending on the details provided, the WFS client may try several standard URL formats to determine how to initially access the service.
The following code shows how to overlay an OGC map layer on the map.
OGC map layer options
The below sample demonstrates the different OGC map layer options. You may click on the code pen button at the top-right corner to edit the code pen.
OGC Web Map Service explorer
The following tool overlays imagery from the Web Map Services (WMS) and Web Map Tile Services (WMTS) as layers. You may select which layers in the service are rendered on the map. You may also view the associated legends for these layers.
You may also specify the map settings to use a proxy service. The proxy service lets you load resources that are hosted on domains that don't have CORS enabled.
Learn more about the classes and methods used in this article:
See the following articles, which contain code samples you could add to your maps: