How to use the @hpcc-js/map.Leaflet.ClusterCircles function in @hpcc-js/map

To help you get started, we’ve selected a few @hpcc-js/map 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 / demos / h3 / src / roxieSummary.ts View on Github external
declare const espUrl: string;
const connection = connect(espUrl);
const summaryQuery = connection instanceof Query ? connection : undefined;

export class RoxieSummary extends Leaflet.Leaflet {

    _polyMap = new Leaflet.Polygons()
        .columns(["polys", "weight"])
        .polygonColumn("polys")
        .weightColumn("weight")
        .on("moveEnd", () => {
            this.refresh();
        })
        ;

    protected _clusterMap = new Leaflet.ClusterCircles()
        .columns(["latitude", "longitude", "weight"])
        .latitudeColumn("latitude")
        .longitudeColumn("longitude")
        .weightColumn("weight")
        .weightFormat(".0s")
        ;

    constructor() {
        super();
        this
            .layers([this._polyMap, this._clusterMap])
            .mapType("Google")
            .autoZoomToFit(false)
            ;
    }
github hpcc-systems / Visualization / demos / h3 / src / roxieRegion.ts View on Github external
let y = 0;
    for (let i = 0, j = points.length - 1; i < points.length; j = i, i++) {
        const point1 = points[i];
        const point2 = points[j];
        const f = point1[0] * point2[1] - point2[0] * point1[1];
        x += (point1[0] + point2[0]) * f;
        y += (point1[1] + point2[1]) * f;
    }
    const f = area(points) * 6;

    return [x / f, y / f];
}

export class RoxieRegion extends Leaflet.Leaflet {

    protected _clusterMap = new Leaflet.ClusterCircles()
        .columns(["latitude", "longitude", "weight"])
        .latitudeColumn("latitude")
        .longitudeColumn("longitude")
        .weightColumn("weight")
        .weightFormat("")
        ;

    protected _pinsMap = new Leaflet.ClusterPins()
        .columns(["latitude", "longitude", "payload"])
        .latitudeColumn("latitude")
        .longitudeColumn("longitude")
        .tooltipColumn("payload")
        .popupColumn("payload")
        ;

    constructor() {
github hpcc-systems / Visualization / demos / h3 / src / roxieSummaryRegion.ts View on Github external
declare const espUrl: string;
const connection = connect(espUrl);
const summaryQuery = connection instanceof Query ? connection : undefined;

export class RoxieSummaryRegion extends Leaflet.Leaflet {

    _polyMap = new Leaflet.Polygons()
        .columns(["polys", "weight"])
        .polygonColumn("polys")
        .weightColumn("weight")
        .on("moveEnd", () => {
            this.refresh();
        })
        ;

    protected _clusterMap = new Leaflet.ClusterCircles()
        .columns(["latitude", "longitude", "weight"])
        .latitudeColumn("latitude")
        .longitudeColumn("longitude")
        .weightColumn("weight")
        .weightFormat(".0s")
        ;

    protected _pinsMap = new Leaflet.ClusterPins()
        .columns(["latitude", "longitude", "payload"])
        .latitudeColumn("latitude")
        .longitudeColumn("longitude")
        .tooltipColumn("payload")
        .popupColumn("payload")
        ;

    constructor() {