How to use the @here/harp-omv-datasource/lib/OmvData.OmvProtobufDataAdapter function in @here/harp-omv-datasource

To help you get started, we’ve selected a few @here/harp-omv-datasource 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-map-editor / src / map-editor / map-handler / MapGeometryList.ts View on Github external
async function dumpTile(geoPoint: GeoCoordinates, level: number) {
    const tileKey = webMercatorTilingScheme.getTileKey(geoPoint, level);

    if (!tileKey) {
        throw new Error("failed to get tile");
    }

    geometryList = {};
    const buffer = (await dataProvider.getTile(tileKey)) as ArrayBuffer;
    const decoder = new Decoder();
    const adapter = new OmvProtobufDataAdapter(decoder);

    adapter.process(buffer, tileKey);
}