|
@@ -44,6 +44,7 @@ export class AdjusterService {
|
|
|
})
|
|
})
|
|
|
.then((response) => {
|
|
.then((response) => {
|
|
|
const clusterData = response.data.response;
|
|
const clusterData = response.data.response;
|
|
|
|
|
+ console.log(clusterData);
|
|
|
/*let max = 0;
|
|
/*let max = 0;
|
|
|
this.clusters.forEach((a) => {
|
|
this.clusters.forEach((a) => {
|
|
|
if (a.aggregate > max) {
|
|
if (a.aggregate > max) {
|
|
@@ -62,6 +63,11 @@ export class AdjusterService {
|
|
|
const featureData = clusterData.find(
|
|
const featureData = clusterData.find(
|
|
|
(item) => item['nuts_id'] === feature.get('NUTS_ID')
|
|
(item) => item['nuts_id'] === feature.get('NUTS_ID')
|
|
|
);
|
|
);
|
|
|
|
|
+ if (!featureData) {
|
|
|
|
|
+ console.error(`No data for feature ${feature.get('NUTS_ID')}`);
|
|
|
|
|
+ console.log(feature);
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
Object.keys(featureData).forEach(function (key, index) {
|
|
Object.keys(featureData).forEach(function (key, index) {
|
|
|
if (key !== 'nuts_id') {
|
|
if (key !== 'nuts_id') {
|
|
|
feature.set(key, featureData[key]);
|
|
feature.set(key, featureData[key]);
|