leaflet-tilelayer-swiss1.0.1 • Public • Published
- Basic example with one map layer
- Advanced example with multiple map layers
- List of all available layers
swisstopo web access
Most of the base map layers come with some usage restriction which is enforced by checking the HTTP Referer of map tile requests.
localhostis always accepted as as a Referer.
- In order to include a map on a website hosted at example.com, a swisstopo web access account for example.com is required. There is a free tier (no credit card required) limited to 25 gigapixels per year.
Most overlay layers are freely accessible, see list of layers and their accessiblity.
// Create a map with LV95 (EPSG:2056) CRS and default base map layervar map = L;// Center on EPSG:2056 coordinates [2600000, 1200000]map;
Options are shown with their default values.
A list with all available layers and corresponding options is available here.
Coordinate reference systems (CRS)
Two CRS are commonly used in Switzerland:
In order to use EPSG:21781, both map and layer CRS have to be adapted:
var map = L;map;
The terms of service suggest the phrase "Source: Federal Topographical Office (agreement no.)", which you may want to use if you have an agreement number from swisstopo.
This plugin is licensed under the MIT license, see the LICENSE file.