How to use the geojson-vt.default function in geojson-vt

To help you get started, we’ve selected a few geojson-vt 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 heremaps / harp.gl / @here / harp-mapview-decoder / lib / GeoJsonTiler.ts View on Github external
/*
 * Copyright (C) 2017-2019 HERE Europe B.V.
 * Licensed under Apache 2.0, see full license in LICENSE
 * SPDX-License-Identifier: Apache-2.0
 */

import { GeoJson, ITiler } from "@here/harp-datasource-protocol";
import { TileKey } from "@here/harp-geoutils";

// tslint:disable-next-line:no-var-requires
const geojsonvtExport = require("geojson-vt");
// to be able to run tests on nodejs
const geojsonvt = geojsonvtExport.default || geojsonvtExport;

interface GeoJsonVtIndex {
    geojson: GeoJson;
    getTile(level: number, column: number, row: number): any;
}

export class GeoJsonTiler implements ITiler {
    indexes: Map;

    constructor() {
        this.indexes = new Map();
    }

    dispose() {
        /* */
    }

geojson-vt

Slice GeoJSON data into vector tiles efficiently

ISC
Latest version published 6 years ago

Package Health Score

77 / 100
Full package analysis

Popular geojson-vt functions