1.0.4 • Published 6 years ago

gbif-map v1.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

<gbif-map>

A Leaflet based Web Component for displaying occurances of a GBIF entry on a map.

Note: Uses ResizeObserver. Polyfill it on your end.

API

Inputs

AttributeDescription
center-latitudeLatitude value for the center point. Float32.
center-longitudeLongitude value for the center point. Float32.
gbif-idThe ID for the item on GBIF. Number.
gbif-styleThe style for the GBIF layer. See link in developer notes to API with all styles listed.
controlsWether or not to allow controls in the map. Boolean.

Usage

Install gbif-map via npm and import it in your webpack/rollup bundles.

Alternatively, import it in your ES module supported browser with import 'https://unpkg.com/gbif-map?module'; in a JavaScript module file or in your HTML with <script src="https://unpkg.com/gbif-map?module" type="module"></script>. The demo page uses the latter method.

Developer notes

GBIF API is available at https://www.gbif.org/developer/maps