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