How to use @here/harp-mapview-decoder - 10 common examples

To help you get started, we’ve selected a few @here/harp-mapview-decoder 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 / test / rendering / GeoJsonDataRendering.ts View on Github external
lookAt.tilt,
            lookAt.azimuth
        );
        // Shutdown errors cause by firefox bug
        mapView.renderer.getContext().getShaderInfoLog = (x: any) => {
            return "";
        };

        const geoJsonDataSource = new OmvDataSource({
            decoder: new OmvTileDecoder(),
            dataProvider: new GeoJsonDataProvider(
                "geojson",
                typeof options.geoJson === "string"
                    ? new URL(options.geoJson, window.location.href)
                    : options.geoJson,
                { tiler: new GeoJsonTiler() }
            ),
            name: "geojson",
            styleSetName: "geojson"
        });

        mapView.addDataSource(geoJsonDataSource);

        await waitForEvent(mapView, MapViewEventNames.FrameComplete);

        await ibct.assertCanvasMatchesReference(canvas, options.testImageName);
    }
github heremaps / harp.gl / @here / harp-examples / src / multiview_sync-filter-view.ts View on Github external
const mapViews = {
        view1: initMapView("mapCanvas", 0, 0, defaultTheme),
        view2: initMapView("mapCanvas2", 1, 0, defaultTheme)
    };
    // end:vislib_multiview_mapDiffView_1.ts

    // snippet:vislib_multiview_mapDiffView_2.ts
    const dataSources = {
        omvDataSource1: new OmvDataSource({
            baseUrl: "https://xyz.api.here.com/tiles/osmbase/256/all",
            apiFormat: APIFormat.MapzenV2,
            createTileInfo: true,
            styleSetName: "tilezen",
            gatherFeatureIds: true,
            showMissingTechniques: true,
            tileFactory: new TileFactory(OmvDebugLabelsTile),
            maxZoomLevel: 17
        }),

        omvDataSource2: new OmvDataSource({
            baseUrl: "https://xyz.api.here.com/tiles/osmbase/256/all",
            apiFormat: APIFormat.MapzenV2,
            createTileInfo: true,
            styleSetName: "tilezen",

            gatherFeatureIds: true,
            showMissingTechniques: true,
            tileFactory: new TileFactory(OmvDebugLabelsTile),
            maxZoomLevel: 17
        })
    };
github heremaps / harp.gl / @here / harp-geojson-datasource / lib / GeoJsonDataSource.ts View on Github external
constructor(readonly params: GeoJsonDataSourceParameters) {
        super(new TileFactory(GeoJsonTile), {
            styleSetName: params.styleSetName || "geojson",
            name: params.name,
            tilingScheme: webMercatorTilingScheme,
            dataProvider: params.dataProvider,
            concurrentDecoderServiceName: "geojson-tile-decoder",
            storageLevelOffset: -1
        });
    }
github heremaps / harp.gl / @here / harp-examples / src / datasource_custom.ts View on Github external
constructor(options: TileDataSourceOptions) {
            super(new TileFactory(CustomTile), options);
        }
    }
github heremaps / harp.gl / @here / harp-omv-datasource / lib / OmvDataSource.ts View on Github external
constructor(private m_params: OmvWithRestClientParams | OmvWithCustomDataProvider) {
        super(m_params.tileFactory || new TileFactory(OmvTile), {
            styleSetName: m_params.styleSetName || "omv",
            name: m_params.name,
            tilingScheme: webMercatorTilingScheme,
            dataProvider: getDataProvider(m_params),
            concurrentDecoderServiceName: OMV_TILE_DECODER_SERVICE_TYPE,
            decoder: m_params.decoder,
            concurrentDecoderScriptUrl: m_params.concurrentDecoderScriptUrl,
            copyrightInfo: m_params.copyrightInfo,
            copyrightProvider: m_params.copyrightProvider,
            minZoomLevel: getOptionValue(m_params.minZoomLevel, 1),
            maxZoomLevel: getOptionValue(m_params.maxZoomLevel, 14),
            storageLevelOffset: getOptionValue(m_params.storageLevelOffset, -1)
        });

        this.cacheable = true;
        this.addGroundPlane =
github heremaps / harp.gl / @here / harp-geojson-datasource / lib / GeoJsonDecoder.ts View on Github external
static start() {
        WorkerServiceManager.getInstance().register({
            serviceType: "geojson-tile-decoder",
            factory: (serviceId: string) =>
                TileDecoderService.start(serviceId, new GeoJsonTileDecoder())
        });
    }
}
github heremaps / harp.gl / @here / harp-examples / decoder / custom_decoder.ts View on Github external
static start() {
        WorkerServiceManager.getInstance().register({
            serviceType: CUSTOM_DECODER_SERVICE_TYPE,
            factory: (serviceId: string) => TileDecoderService.start(serviceId, new CustomDecoder())
        });
    }
}
github heremaps / harp.gl / @here / harp-omv-datasource / lib / OmvDecoder.ts View on Github external
static start() {
        WorkerServiceManager.getInstance().register({
            serviceType: OMV_TILE_DECODER_SERVICE_TYPE,
            factory: (serviceId: string) =>
                TileDecoderService.start(serviceId, new OmvTileDecoder())
        });
    }
}
github heremaps / harp.gl / @here / harp-examples / decoder / custom_decoder.ts View on Github external
            factory: (serviceId: string) => TileDecoderService.start(serviceId, new CustomDecoder())
        });
github heremaps / harp.gl / @here / harp-omv-datasource / lib / OmvDecoder.ts View on Github external
factory: (serviceId: string) =>
                TileDecoderService.start(serviceId, new OmvTileDecoder())
        });