@openlayers-elements/swisstopo

0.3.0 • Public • Published

swisstopo-elements

OpenLayers elements for adding swisstopo maps to openlayers-elements

See documentation and demos.

Quick start

To install run

yarn add @openlayers-elements/swisstopo @openlayers-elements/core

Then add the WMTS layer to your ol-map

<script type="module">
  import '@openlayers-elements/swisstopo/core/ol-map'
  import '@openlayers-elements/swisstopo/swisstopo-wmts'
</script>

<ol-map zoom="7" lat="46.7985" lon="8.2318">
    <swisstopo-wmts layer-name="ch.swisstopo.pixelkarte-grau"></swisstopo-wmts>
</ol-map>
For valid layer names, check http://api3.geo.admin.ch/api/faq/index.html#which-layers-are-available

Note that these layers require to register with http://swisstopo.ch/webaccess

Running examples

For the reason mentioned above, the online demos don't work. You can run them locally (check the root readme). Here's a how the two sample maps look like in the browser when the map API is acessible:

swisstopo example

It is jus tas easy to overlay OpenStreetMap with a Swisstopo layer:

swisstopo OSM

Readme

Keywords

none

Package Sidebar

Install

npm i @openlayers-elements/swisstopo

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

11.1 kB

Total Files

11

Last publish

Collaborators

  • tpluscode