Basemap for British National Grid

471
1
03-19-2020 04:37 AM
ScottWilson2
New Contributor II

I've been asked to display all maps as British National Grid.  I have managed get this working using the OS Open Raster REST service and using some example code found here: https://codepen.io/digz6666/pen/wPwPbW 

We subscribe to ViaEuropa, we have access to more detailed master maps.  There documentations is here: WMTS | viaEuropa Documentation 

I'm trying to use this service on my map, but i'm not sure how.   When i try updating the code above from codepen with the following (substituting my details in the curly brackets) url https://tile.viaeuropa.uk.com/{id}/{map}/wmts/1.0.0/WMTSCapabilities.xml the map doesn't load. Are they supplying basemaps or layers? 

This is the xml response i see when i view WMTSCapabilities.xml in the browser.  How do i use this data with arcgis js api 3.29?

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Capabilities xmlns="http://www.opengis.net/wmts/1.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml" xsi:schemaLocation="http://www.opengis.net/wmts/1.0 http://schemas.opengis.net/wmts/1.0/wmtsGetCapabilities_response.xsd" version="1.0.0">
<!--   Service Identification   -->
<ows:ServiceIdentification>
<ows:Title>viaEuropa WMTS (m0105)</ows:Title>
<ows:Abstract xml:lang="en">
viaEuropa WMTS from Europa Technologies. https://www.europa.uk.com
</ows:Abstract>
<ows:ServiceType>OGC WMTS</ows:ServiceType>
<ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion>
</ows:ServiceIdentification>
<ows:ServiceProvider>
<ows:ProviderName>Europa Technologies Ltd.</ows:ProviderName>
<ows:ProviderSite xlink:href="https://www.europa.uk.com"/>
</ows:ServiceProvider>
<!--   Operations Metadata   -->
<ows:OperationsMetadata>
<ows:Operation name="GetCapabilities">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts/1.0.0/WMTSCapabilities.xml">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>RESTful</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
<ows:Get xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts?">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>KVP</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
<ows:Operation name="GetTile">
<ows:DCP>
<ows:HTTP>
<ows:Get xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>RESTful</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
<ows:Get xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts?">
<ows:Constraint name="GetEncoding">
<ows:AllowedValues>
<ows:Value>KVP</ows:Value>
</ows:AllowedValues>
</ows:Constraint>
</ows:Get>
</ows:HTTP>
</ows:DCP>
</ows:Operation>
</ows:OperationsMetadata>
<!--  Contents  -->
<Contents>
<Layer>
<ows:Title>
m0105 - Ordnance Survey (GB) premium raster stack to MM Topo (BNG)
</ows:Title>
<ows:Identifier>viaEuropa_m0105</ows:Identifier>
<ows:WGS84BoundingBox crs="urn:ogc:def:crs:OGC:2:84">
<ows:LowerCorner>-10.0 49.6</ows:LowerCorner>
<ows:UpperCorner>4.55 62.7</ows:UpperCorner>
</ows:WGS84BoundingBox>
<ows:BoundingBox crs="urn:ogc:def:crs:EPSG::27700">
<ows:LowerCorner>0 0</ows:LowerCorner>
<ows:UpperCorner>700000 1300000</ows:UpperCorner>
</ows:BoundingBox>
<Style isDefault="true">
<ows:Identifier>default</ows:Identifier>
</Style>
<Format>image/png</Format>
<TileMatrixSetLink>
<TileMatrixSet>BNGCompatible</TileMatrixSet>
</TileMatrixSetLink>
<ResourceURL format="image/png" resourceType="tile" template="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts/tile_inv/{TileMatrix}/{TileCol}/{TileRow}.png"/>
</Layer>
<TileMatrixSet>
<ows:Title>BritishNationalGridCompatible</ows:Title>
<ows:Abstract>British National Grid tile matrix set</ows:Abstract>
<ows:Identifier>BNGCompatible</ows:Identifier>
<ows:SupportedCRS>urn:ogc:def:crs:EPSG::27700</ows:SupportedCRS>
<TileMatrix>
<ows:Identifier>0</ows:Identifier>
<ScaleDenominator>10000000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>1</MatrixWidth>
<MatrixHeight>2</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>1</ows:Identifier>
<ScaleDenominator>5000000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>2</MatrixWidth>
<MatrixHeight>4</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>2</ows:Identifier>
<ScaleDenominator>2500000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>4</MatrixWidth>
<MatrixHeight>8</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>3</ows:Identifier>
<ScaleDenominator>1000000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>10</MatrixWidth>
<MatrixHeight>20</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>4</ows:Identifier>
<ScaleDenominator>500000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>20</MatrixWidth>
<MatrixHeight>40</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>5</ows:Identifier>
<ScaleDenominator>250000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>40</MatrixWidth>
<MatrixHeight>80</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>6</ows:Identifier>
<ScaleDenominator>100000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>100</MatrixWidth>
<MatrixHeight>200</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>7</ows:Identifier>
<ScaleDenominator>75000</ScaleDenominator>
<TopLeftCorner>0 1430016</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>133</MatrixWidth>
<MatrixHeight>266</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>8</ows:Identifier>
<ScaleDenominator>50000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>200</MatrixWidth>
<MatrixHeight>400</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>9</ows:Identifier>
<ScaleDenominator>25000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>400</MatrixWidth>
<MatrixHeight>800</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>10</ows:Identifier>
<ScaleDenominator>10000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>1000</MatrixWidth>
<MatrixHeight>2000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>11</ows:Identifier>
<ScaleDenominator>5000</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>2000</MatrixWidth>
<MatrixHeight>4000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>12</ows:Identifier>
<ScaleDenominator>2500</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>4000</MatrixWidth>
<MatrixHeight>8000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>13</ows:Identifier>
<ScaleDenominator>1250</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>8000</MatrixWidth>
<MatrixHeight>16000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>14</ows:Identifier>
<ScaleDenominator>625</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>16000</MatrixWidth>
<MatrixHeight>32000</MatrixHeight>
</TileMatrix>
<TileMatrix>
<ows:Identifier>15</ows:Identifier>
<ScaleDenominator>312.5</ScaleDenominator>
<TopLeftCorner>0 1433600</TopLeftCorner>
<TileWidth>256</TileWidth>
<TileHeight>256</TileHeight>
<MatrixWidth>32000</MatrixWidth>
<MatrixHeight>64000</MatrixHeight>
</TileMatrix>
</TileMatrixSet>
</Contents>
<ServiceMetadataURL xlink:href="https://tile.publicsectormapping.gov.scot/*REDACTED*/m0105/wmts/1.0.0/WMTSCapabilities.xml"/>
</Capabilities>
Tags (1)
0 Kudos
1 Reply
Egge-JanPollé1
MVP Regular Contributor

Hi Scott Wilson,

Did you have a look at this one?

WMTS layer | ArcGIS API for JavaScript 3.31 

HTH,

Egge-Jan

0 Kudos