1.2.0 • Published 6 years ago
leaflet.infobutton v1.2.0
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.infobuttonAfter 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 <p> tag</p>"
}).addTo(map);Options:
title:title of the popup box, default isAboutbuttonTittle: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 isfalseminWidth:allows you to hide the map interface on mobile devices by setting a minimum screen size, default is500- It also support the same options as those of Control such as position.
License:
This project is under the MIT license