How to use the @here/harp-features-datasource.MapViewMultiPolygonFeature 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_polygons.ts View on Github external
for (let j = 0; j < EU.statesGroup.length; j++) {
            const stateGroup = EU.statesGroup[j];
            const features: MapViewFeature[] = [];
            let age = steps.length;
            let k = 0;
            while (EU.steps[steps[k]].joining.indexOf(j) === -1) {
                age--;
                k++;
            }
            if (stateGroup.indexOf("germany") > -1) {
                age = steps.length;
            }

            // snippet:harp_demo_features_polygons_2.ts
            for (const country of stateGroup) {
                const feature = new MapViewMultiPolygonFeature(COUNTRIES[country], {
                    name: country,
                    joiningDate: getJoiningDate(j),
                    height: 25000 + age * 25000
                });
                features.push(feature);
            }
            const featuresDataSource = new FeaturesDataSource({
                name: `member-states-${j}`,
                styleSetName: "geojson",
                features,
                maxGeometryHeight: 300000
            });
            const addPromise = map.addDataSource(featuresDataSource);
            addPromises.push(addPromise);
            datasources.push(featuresDataSource);
            // end:harp_demo_features_polygons_2.ts

@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