The following code explains all steps required to get started with Leaflet.TileLayer.Swiss. It corresponds to the example at the top of the page. In order to run it locally, copy the 2 files below into a folder on your computer, then run a local web server from that folder and open it in your browser.
Note that you will also need to sign up for Swisstopo web access if you want to publish your application.
A leaflet-tilelayer-swiss npm package is available as well.
The README on GitHub contains more information, including full API documentation.
The multiple layers example demonstrates advanced usage of the plugin.
© Roman Karavia, MIT license