1.0.0 • Published 3 years ago

slider-map v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Slider Map

To add to your the slider map component to your website (after setting up your account on maps for all):

 Browser

Import the component by adding a src tag in the header (<head>):

<script src="https://unpkg.com/slider-map">

Create elements in page:

<div id="mapid"></div>
<div id="controlid"></div>

You can set your own ids for the elements

And then running in the script section:

<script>
  const map = new SliderMap('your-id-goes-here', 'mapid', 'controlid');
  map.create();
</script>

If you are using different ids, pass them here

 Node

Install the slider map package using NPM

npm install --save slider-map

Create elements in page:

<div id="mapid"></div>
<div id="controlid"></div>

You can set your own ids for the elements

And then running:

import {SliderMap} from 'slider-map';
const map = new SliderMap('your-id-goes-here', 'mapid', 'controlid');
map.create();

If you are using different ids, pass them here