|
|
@@ -3,7 +3,7 @@ import {Injectable} from '@angular/core';
|
|
|
|
|
|
import {Feature} from 'ol';
|
|
|
import {Fill, Stroke, Style} from 'ol/style';
|
|
|
-import {GeoJSON} from 'ol/format';
|
|
|
+import {GeoJSON, TopoJSON} from 'ol/format';
|
|
|
import {Geometry} from 'ol/geom';
|
|
|
import {Vector as VectorLayer} from 'ol/layer';
|
|
|
import {Vector as VectorSource} from 'ol/source';
|
|
|
@@ -94,16 +94,6 @@ export class AppService {
|
|
|
/*this.hsEventBus.olMapLoads.subscribe((map) => {
|
|
|
map.on('click', this.debugMe);
|
|
|
});*/
|
|
|
- this.adjusterEventService.loaded.subscribe(({success}) => {
|
|
|
- if (success) {
|
|
|
- this.adjusterLegendService.refreshColorPalette(
|
|
|
- this.adjusterService.numberOfClusters
|
|
|
- );
|
|
|
- /*this.colorPalette = this.generateRandomColorPalette(
|
|
|
- adjusterService.clusters.length
|
|
|
- );*/
|
|
|
- }
|
|
|
- });
|
|
|
/*this.adjusterEventService.methodChanged.subscribe((method) => {
|
|
|
//TODO: prettify this
|
|
|
this.nuts3ClustersLayer.set(
|
|
|
@@ -129,6 +119,7 @@ export class AppService {
|
|
|
method.layer = new VectorLayer({
|
|
|
properties: {
|
|
|
editor: {editable: false},
|
|
|
+ editable: false,
|
|
|
//queryable: false,
|
|
|
autoLegend: false,
|
|
|
title: `NUTS3 regions: ${method.name.replace(
|
|
|
@@ -146,8 +137,8 @@ export class AppService {
|
|
|
},
|
|
|
source: new VectorSource({
|
|
|
//features: new GeoJSON().readFeatures(nuts3).map((f) => f.clone()),
|
|
|
- format: new GeoJSON(),
|
|
|
- url: require('./data/NUTS_RG_20M_2016_3857_LEVL_3.geojson').default,
|
|
|
+ format: new TopoJSON({dataProjection: 'EPSG:3857'}),
|
|
|
+ url: require('./data/NUTS_RG_20M_2016_3857_LEVL_3.topojson').default,
|
|
|
overlaps: false,
|
|
|
}),
|
|
|
visible: true,
|