How to use the @here/harp-datasource-protocol.isLineTechnique function in @here/harp-datasource-protocol

To help you get started, we’ve selected a few @here/harp-datasource-protocol 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 / lib / geometry / TileGeometryLoader.ts View on Github external
export function setDefaultGeometryKind(technique: Technique): GeometryKind | GeometryKindSet {
        let geometryKind = technique.kind;

        // Set default kind based on technique.
        if (geometryKind === undefined) {
            if (isFillTechnique(technique)) {
                geometryKind = GeometryKind.Area;
            } else if (
                isLineTechnique(technique) ||
                isSolidLineTechnique(technique) ||
                isSegmentsTechnique(technique) ||
                isExtrudedLineTechnique(technique)
            ) {
                geometryKind = GeometryKind.Line;
            } else if (isExtrudedPolygonTechnique(technique)) {
                geometryKind = GeometryKind.Building;
            } else if (
                isPoiTechnique(technique) ||
                isLineMarkerTechnique(technique) ||
                isTextTechnique(technique)
            ) {
                geometryKind = GeometryKind.Label;
            } else {
                geometryKind = GeometryKind.All;
            }
github heremaps / harp.gl / @here / harp-mapview / lib / geometry / TileGeometryCreator.ts View on Github external
tile.boundingBox.extents.y * expandFactor;
                            planes[3].constant = -bottomConstant;
                        }
                    );
                }

                if (
                    (isCirclesTechnique(technique) || isSquaresTechnique(technique)) &&
                    technique.enablePicking !== undefined
                ) {
                    // tslint:disable-next-line:max-line-length
                    (object as MapViewPoints).enableRayTesting = technique.enablePicking!;
                }

                if (
                    isLineTechnique(technique) ||
                    (isSegmentsTechnique(technique) &&
                        technique.color !== undefined &&
                        Expr.isExpr(technique.color))
                ) {
                    const fadingParams = this.getFadingParams(displayZoomLevel, technique);
                    FadingFeature.addRenderHelper(
                        object,
                        viewRanges,
                        fadingParams.fadeNear,
                        fadingParams.fadeFar,
                        false,
                        (renderer, mat) => {
                            const lineMaterial = mat as THREE.LineBasicMaterial;
                            lineMaterial.color.set(
                                getPropertyValue(technique.color, mapView.zoomLevel)
                            );
github heremaps / harp.gl / @here / harp-omv-datasource / lib / OmvDecodedTileEmitter.ts View on Github external
worldLines.push(worldLine);
            uvs.push(lineUvs);
            offsets.push(lineOffsets);
        }

        const wantCircle = this.m_decodeInfo.tileKey.level >= 11;

        for (const technique of techniques) {
            if (technique === undefined) {
                continue;
            }
            const techniqueIndex = technique._index;
            const techniqueName = technique.name;

            if (isLineTechnique(technique) || isSolidLineTechnique(technique)) {
                const lineGeometry = isLineTechnique(technique)
                    ? this.m_simpleLines
                    : this.m_solidLines;

                const lineType = isLineTechnique(technique) ? LineType.Simple : LineType.Complex;

                this.applyLineTechnique(
                    lineGeometry,
                    technique,
                    techniqueIndex,
                    lineType,
                    env.entries,
                    localLines,
                    context,
                    this.getTextureCoordinateType(technique) ? uvs : undefined,
                    hasUntiledLines ? offsets : undefined
                );
github heremaps / harp.gl / @here / harp-omv-datasource / lib / OmvDecodedTileEmitter.ts View on Github external
localLines.push(localLine);
            worldLines.push(worldLine);
            uvs.push(lineUvs);
            offsets.push(lineOffsets);
        }

        const wantCircle = this.m_decodeInfo.tileKey.level >= 11;

        for (const technique of techniques) {
            if (technique === undefined) {
                continue;
            }
            const techniqueIndex = technique._index;
            const techniqueName = technique.name;

            if (isLineTechnique(technique) || isSolidLineTechnique(technique)) {
                const lineGeometry = isLineTechnique(technique)
                    ? this.m_simpleLines
                    : this.m_solidLines;

                const lineType = isLineTechnique(technique) ? LineType.Simple : LineType.Complex;

                this.applyLineTechnique(
                    lineGeometry,
                    technique,
                    techniqueIndex,
                    lineType,
                    env.entries,
                    localLines,
                    context,
                    this.getTextureCoordinateType(technique) ? uvs : undefined,
                    hasUntiledLines ? offsets : undefined
github heremaps / harp.gl / @here / harp-omv-datasource / lib / OmvDecodedTileEmitter.ts View on Github external
for (const coord of outline) {
                        ringContour.push(coord.x, coord.y);
                        if (computeTexCoords !== undefined) {
                            const { u, v } = computeTexCoords(coord, extents);
                            ringContour.push(u, v);
                        }
                    }

                    rings.push(new Ring(extents, vertexStride, ringContour));
                }

                polygons.push(rings);
            }

            const isLine = isSolidLineTechnique(technique) || isLineTechnique(technique);
            if (isPolygon) {
                this.applyPolygonTechnique(
                    polygons,
                    technique,
                    techniqueIndex,
                    featureId,
                    context,
                    extents
                );
            } else if (isLine) {
                const lineGeometry =
                    technique.name === "line" ? this.m_simpleLines : this.m_solidLines;

                const lineType = technique.name === "line" ? LineType.Simple : LineType.Complex;

                polygons.forEach(rings => {