Leaflet entity selector control Web Component made by Paraboly@dev
npm install @paraboly/pwc-leaflet-entity-selector!WebComponent PWC README Boilerplate



!Platform - Platform Free Web

src="https://raw.githubusercontent.com/paraboly/pwc-leaflet-entity-selector/master/assets/Screenshots/JSLibraryBoilerplate.png" />
- Put two script tags similar to this in the head of your index.html:
``html`
type="module"
src="https://unpkg.com/@paraboly/pwc-leaflet-entity-selector@latest/dist/pwc-leaflet-entity-selector/pwc-leaflet-entity-selector.esm.js"
>
nomodule
src="https://unpkg.com/@paraboly/pwc-leaflet-entity-selector@latest/dist/pwc-leaflet-entity-selector/pwc-leaflet-entity-selector.js"
>
- Run npm install @paraboly/pwc-leaflet-entity-selector --save
- Put a script tag similar to this in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc
- Run npm install @paraboly/pwc-leaflet-entity-selector --saveimport @paraboly/pwc-leaflet-entity-selector;
- Add an import to the npm packages
- Then you can use the element anywhere in your template, JSX, html etc
- Add custom element to any html or jsx file
`html`
- Then, bind map to custom element
`js
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
SchemeSonic, haldun.yildiz@paraboly.com
This repository is available under the MIT license.
See the LICENSE file for more info.