How to use the @here/harp-omv-datasource/lib/OmvDecoder.OmvTileDecoder 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.gl / test / rendering / GeoJsonDataRendering.ts View on Github external
const lookAt = mergeWithOptions(defaultLookAt, options.lookAt);

        mapView.lookAt(
            new GeoCoordinates(lookAt.latitute, lookAt.longitude),
            lookAt.distance,
            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-map-editor / src / map-editor / map-handler / index.ts View on Github external
this.m_mapView.lookAt(
                this.m_mapViewState.target,
                this.m_mapViewState.distance,
                this.m_mapViewState.tilt,
                this.m_mapViewState.azimuth
            );

            this.m_datasource = new OmvDataSource({
                baseUrl: "https://xyz.api.here.com/tiles/herebase.02",
                apiFormat: APIFormat.XYZOMV,
                styleSetName: style || undefined,
                maxZoomLevel: 17,
                authenticationCode: accessToken,
                copyrightInfo: this.m_copyrights,
                decoder: new OmvTileDecoder()
            });

            this.m_copyrightHandler = CopyrightElementHandler.install(
                this.m_copyrightElem,
                this.m_mapView
            );

            this.m_mapView.addEventListener(
                MapViewEventNames.MovementFinished,
                this.onMovementFinished
            );

            this.m_mapView.addDataSource(this.m_datasource);
            this.m_mapView.addEventListener(MapViewEventNames.Render, this.onMapRender);

            this.emit("mapCreated");
github heremaps / harp-map-editor / src / map-editor / map-handler / MapHighliter.ts View on Github external
constructor() {
        this.m_highlightDataSource = new OmvDataSource({
            name: "decorations",
            baseUrl: "https://xyz.api.here.com/tiles/herebase.02",
            apiFormat: APIFormat.XYZOMV,
            styleSetName: "tilezen",
            maxZoomLevel: 17,
            authenticationCode: accessToken,
            decoder: new OmvTileDecoder()
        });
    }