leaflet.projwmts
Leaflet wmts layer with projection
Usage
Download or clone this repo, then build it with:
npm install
gulp build
Example
to run example localy with live-server:
npm serve
if everything is ok, new browser windows should be opened with directory listing, then go to
examples/wmts.html
or
examples/wmts_ortho.html
In examples EPSG:2180 is used, but it should work with diffrent CRS.
To properly configure wmts projection you have to define crs first like:
var crs = "EPSG:2180" "+proj=tmerc +lat_0=0 +lon_0=19 +k=0.9993 +x_0=500000 +y_0=-5300000 +ellps=GRS80 units=m +no_defs" {};
then you can pass it to wmts layer, you have to copy tileSize, origin, scales and tilematrixSet values from service capabilities (url + '?service=WMTS&request=GetCapabilities') :
LtileLayer
If you are using map service from diffrent domain then remember to set in layer options
crossOrigin: true