How to use the @hpcc-js/map.Leaflet.Circles 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 / gallery / samples / geospatial / Leaflet / Circle Lines.js View on Github external
.latitudeColumn("orgin_lat")
    .longitudeColumn("orgin_long")
    .latitude2Column("dest_lat")
    .longitude2Column("dest_long")
    ;

const fromPins = new Leaflet.Circles(false)
    .columns(columns())
    .data(data().filter((d, i) => i === 0))
    .latitudeColumn("orgin_lat")
    .longitudeColumn("orgin_long")
    .fillColor("darkgreen")
    .strokeColor("darkgreen")
    ;

const toCircles = new Leaflet.Circles(false)
    .columns(columns())
    .data(data())
    .latitudeColumn("dest_lat")
    .longitudeColumn("dest_long")
    .fillColor("darkred")
    .strokeColor("darkred")
    ;

new Leaflet.Leaflet()
    .layers([
        lines,
        fromPins,
        toCircles
    ])
    .target("target")
    .render()
github hpcc-systems / Visualization / demos / h3 / src / demo05.ts View on Github external
import { Leaflet } from "@hpcc-js/map";
import { geoToH3, h3ToGeoBoundary } from "h3-js";
import { zoomToResolution } from "./h3lib";
import { H3Polygons as BaseH3Polygons } from "./h3Polygons";

export class H3Polygons extends Leaflet.Leaflet {

    private _hexMap = new Leaflet.Polygons()
        .columns(["h3Idx", "polys", "weight"])
        .polygonColumn("polys")
        .weightColumn("weight")
        ;

    private _circleMap = new Leaflet.Circles()
        .columns(["latitude", "longitude"])
        .data([
            [32.69, -117.192040]
        ])
        .latitudeColumn("latitude")
        .longitudeColumn("longitude")
        .radius(.2)
        .on("moveEnd", () => {
            this.refreshHex();
        })
        ;

    constructor() {
        super();
        this
            .layers([new BaseH3Polygons().paletteID("Greys").opacity(0.1), this._hexMap, this._circleMap])