How to use the @here/harp-features-datasource.MapViewMultiPointFeature function in @here/harp-features-datasource

To help you get started, we’ve selected a few @here/harp-features-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 / @here / harp-examples / src / datasource_features_lines-and-points.ts View on Github external
function getFeatures(features: {
        [key: string]: { [key: string]: number[][] };
    }): MapViewFeature[] {
        const featuresList: MapViewFeature[] = [];
        for (const type of Object.keys(features)) {
            for (const featureName of Object.keys(features[type])) {
                const name = featureName.indexOf("unknown") === -1 ? featureName : undefined;
                // snippet:harp_demo_features_linespoints_1.ts
                const feature = new MapViewLineFeature(features[type][featureName], { name, type });
                // end:harp_demo_features_linespoints_1.ts
                featuresList.push(feature);
            }
        }
        // snippet:harp_demo_features_linespoints_1.ts
        const hotspotsFeature = new MapViewMultiPointFeature(hotspots);
        // end:harp_demo_features_linespoints_1.ts
        featuresList.push(hotspotsFeature);
        return featuresList;
    }
github heremaps / harp.gl / @here / harp-examples / src / datasource_features_lines-and-points.ts View on Github external
function getFeatures(features: {
        [key: string]: { [key: string]: number[][] };
    }): MapViewFeature[] {
        const featuresList: MapViewFeature[] = [];
        for (const type of Object.keys(features)) {
            for (const featureName of Object.keys(features[type])) {
                const name = featureName.indexOf("unknown") === -1 ? featureName : undefined;
                // snippet:harp_demo_features_linespoints_1.ts
                const feature = new MapViewLineFeature(features[type][featureName], { name, type });
                // end:harp_demo_features_linespoints_1.ts
                featuresList.push(feature);
            }
        }
        // snippet:harp_demo_features_linespoints_1.ts
        const hotspotsFeature = new MapViewMultiPointFeature(hotspots);
        // end:harp_demo_features_linespoints_1.ts
        featuresList.push(hotspotsFeature);
        return featuresList;
    }

@here/harp-features-datasource

Provides support for custom features

Apache-2.0
Latest version published 2 years ago

Package Health Score

51 / 100
Full package analysis

Similar packages