0.0.4 • Published 4 years ago

@paraboly/pwc-leaflet-entity-selector v0.0.4

Weekly downloads
43
License
MIT
Repository
github
Last release
4 years ago

Built With Stencil

WebComponent PWC README Boilerplate

Fully customizable readme boilerplate for web component with StencilJS via Paraboly

npm version npm Platform - Platform Free Web License: MIT

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, haldun.yildiz@paraboly.com

License

This repository is available under the MIT license.

See the LICENSE file for more info.