A plugin for using an OGC Maps or Tiles Layer with leafletjs
Download the /dist/OgcLayers.js
Note Compatible with Leaflet v1.7+
Step 1. Include the required js in your document
<script src="./OgcLayers.js"></script>
Step 2. Add your layer to map using the L.ogcMapsLayer
or L.ogcTilesLayer
functions
// Using the default style
L.ogcMapsLayer('https://test.cubewerx.com/cubewerx/cubeserv/demo/ogcapi/Winnipeg_2019/collections/dtm_1m').addTo(map)
// Using the hillshade style
L.ogcMapsLayer('https://test.cubewerx.com/cubewerx/cubeserv/demo/ogcapi/Winnipeg_2019/collections/dtm_1m', {
style: 'hillshade',
f: 'png'
}).addTo(map)
// Using the tiles
L.ogcTilesLayer('http://5.9.22.176:8080/ogcapi/collections/HRDEM-RedRiver:DTM:2m').addTo(map)