How to use the @hpcc-js/leaflet-shim.Polygon function in @hpcc-js/leaflet-shim

To help you get started, we’ve selected a few @hpcc-js/leaflet-shim examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hpcc-systems / Visualization / packages / map / src / leaflet / Polygons.ts View on Github external
data.forEach(row => {
            this.add(new Polygon(this.fixDateLine(polyFunc(row)).map(lngLat2LatLng), {
                color: this._palette(extent[1], extent[0], extent[1]),
                fillColor: this._palette(weightFunc(row), extent[0], extent[1]),
                fillOpacity: this.opacity(),
                weight: 1,
                origRow: row
            } as any).on("click", e => this.clickHandler(e, row)));
        });
    }