@openlayers-elements/maps

Custom elements to declaratively build OpenLayers map

Usage no npm install needed!

<script type="module">
  import openlayersElementsMaps from 'https://cdn.skypack.dev/@openlayers-elements/maps';
</script>

README

@openlayers-elements/maps BrowserStack Status

Custom element wrapping OpenLayers 5 API, thus providing a declarative way to create online maps.

See documentation and demos.

Quick start

To install run

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

Here's the simplest possible OpenStreetMap:

<script type="module">
  import '@openlayers-elements/core/ol-map'
  import '@openlayers-elements/maps/ol-layer-openstreetmap'
</script>

<ol-map zoom="7" lat="46.7985" lon="8.2318">
    <ol-layer-openstreetmap></ol-layer-openstreetmap>
</ol-map>

For further examples go to the online demos, linked from GitHub.