@paraboly/pwc-leaflet-entity-selector
v0.0.4
Published
Leaflet entity selector control Web Component made by Paraboly@dev
Downloads
149
Maintainers
Readme
Installation
Script tag
- Put two script tags similar to this in the head of your index.html:
<script
type="module"
src="https://unpkg.com/@paraboly/pwc-leaflet-entity-selector@latest/dist/pwc-leaflet-entity-selector/pwc-leaflet-entity-selector.esm.js"
></script>
<script
nomodule
src="https://unpkg.com/@paraboly/pwc-leaflet-entity-selector@latest/dist/pwc-leaflet-entity-selector/pwc-leaflet-entity-selector.js"
></script>
Node Modules
- Run
npm install @paraboly/pwc-leaflet-entity-selector --save
- Put a script tag similar to this
<script src='node_modules/@paraboly/pwc-leaflet-entity-selector/dist/pwc-leaflet-entity-selector.js'></script>
in the head of your index.html - Then you can use the element anywhere in your template, JSX, html etc
In a stencil-starter app
- Run
npm install @paraboly/pwc-leaflet-entity-selector --save
- Add an import to the npm packages
import @paraboly/pwc-leaflet-entity-selector;
- Then you can use the element anywhere in your template, JSX, html etc
Usage
- Add custom element to any html or jsx file
<pwc-leaflet-entity-selector></pwc-leaflet-entity-selector>
- Then, bind map to custom element
var pwcEntitySelectorControl = document.querySelector(
"pwc-leaflet-entity-selector"
);
pwcEntitySelectorControl.map = map; // Set leaflet map instance
pwcEntitySelectorControl.addEventListener("controlEvents", control => {
console.log(control);
});
- Check
src/index.html
for more details
Authors
SchemeSonic, [email protected]
License
This repository is available under the MIT license.
See the LICENSE file for more info.