Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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