WMTS Layers

This sample shows how to add an instance of WMTSLayer. The WMTSLayer is used to create layers based on OGC Web Map Tile Service (WMTS). Typically, a WMTS service acts as a directory of WMTS layers, you can set a specific layer using the activeLayer property, (or else it will default to the first sublayer). The WMTSLayer initially executes a WMTS GetCapabilities request, which might require CORS or a proxy page.

The layers used in this sample are from Instituto Geográfico Nacional. Use the Basemap Toggle component to toggle between the layers.

About this sample

This GeoBlazor sample, written in Blazor for .NET developers, demonstrates the WMTSLayer (OGC Web Map Tile Service) from the ArcGIS Maps SDK for JavaScript exposed through GeoBlazor's WMTSLayer, WMTSSublayer, Basemap, and BasemapToggleWidget Razor components. The page shows a 2D map centered on Madrid, Spain at roughly 1:4.6 million scale. Two Basemaps are configured, both built from WMTSLayers served by Spain's Instituto Geografico Nacional in KVP service mode: the default basemap uses the IGNBase-gris gray-tone reference layer, and the alternate basemap uses the MTN topographic raster layer; each basemap references a thumbnail GetTile request so the toggle button can render its preview. A BasemapToggleWidget in the lower-left corner of the map lets the user switch between the two IGN WMTS basemaps. The sample is intended to demonstrate consuming OGC WMTS tile services and exposing them through a basemap toggle in a Blazor application without writing JavaScript.