瀏覽代碼

🐛 add the layer in the end to apply the symbology correctly

fzadrazil 3 年之前
父節點
當前提交
c099635fb7
共有 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> {