Просмотр исходного кода

fix: Add the layer in the end to apply the symbology correctly

fzadrazil 3 лет назад
Родитель
Сommit
c4cbc6910f
1 измененных файлов с 1 добавлено и 5 удалено
  1. 1 5
      src/app/calculator/zones.service.ts

+ 1 - 5
src/app/calculator/zones.service.ts

@@ -131,7 +131,6 @@ export class ZonesService {
       //style: this.zonesStyle,
       source: this.zonesSource,
     });
-    this.hsAddDataService.addLayer(this.zonesLayer, null);
     
     this.zonesSource.clear();
     this.updateZonesStyle(quantileCount);
@@ -149,10 +148,7 @@ export class ZonesService {
         featureProjection: 'EPSG:5514',
       })
     );
-    this.hsStylerService.get('default').styleObject = zonesStyleObj;
-    this.hsStylerService.get('default').layer = this.zonesLayer;
-    this.hsStylerService.save('default');
-    //this.updateZonesStyle(quantileCount);
+    this.hsAddDataService.addLayer(this.zonesLayer, null);
   }
 
   private getSymbolizerRules(classes: number): Array<any> {