1.2.0 • Published 4 years ago

leaflet.infobutton v1.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

Leaflet.infoButton

Leaflet.infoButton is a Leaflet plugin that provides a highly css-customizable popup box on the map.

The code is a modified version of the Leaflet.infoButton made by Eclipse1979

Usage:

You can install this plugin via npm:

npm i leaflet.infobutton

After install, you can import and use:

import 'leaflet.infoButton/dist/leaflet.infoButton';
...
L.control.infoButton({
  buttonTittle: "I'm a button, press me!",
  title: "<h1>This text is customizable</h1>",
  position: "bottomleft",
  html: "This text is customizable too. <p>I'm a paragraph inside HTML &lt;p&gt; tag</p>"
}).addTo(map);

Options:

  • title: title of the popup box, default is About
  • buttonTittle: title of the popup box, default is <h1>Title</h1>
  • html: html content of the popup, default is <p>This map was generated by Leaflet.</p>
  • show: wether the popup should activate at the beginning, default is false
  • minWidth: allows you to hide the map interface on mobile devices by setting a minimum screen size, default is 500
  • It also support the same options as those of Control such as position.

License:

This project is under the MIT license

1.2.0

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago