leaflet-interact-intent

0.0.1 • Public • Published

Interact intent: a plugin for Leaflet.

This plugin attempts to enable map interaction when a user wants to interacts with a map. Page scrolling should work without unintentionaly zooming when a map is reached on a page.

Want to see it in action? Check out the demo

Usage

<link href='leaflet-interact-intent.css' rel='stylesheet' />
<script src='leaflet-interact-intent.js'></script>
 
<script>
  var map = L.map('map');
  new leafletInteractIntent().addTo(map)
</script> 

Options

You can also pass an option to trigger interaction on click.

var map = L.map('map');
new leafletInteractIntent({
    clicktoplay: true
}).addTo(map)

Building

npm install && make

ProTip You may want to install watch so you can run watch make without needing to execute make on every change.

/leaflet-interact-intent/

    Package Sidebar

    Install

    npm i leaflet-interact-intent

    Weekly Downloads

    4

    Version

    0.0.1

    License

    BSD

    Last publish

    Collaborators

    • tristen