forked from MapComplete/MapComplete
Add switch to hide certain features, cleanup of code
This commit is contained in:
parent
aa0989b72a
commit
1b1ec9f15d
18 changed files with 230 additions and 173 deletions
|
@ -3,6 +3,9 @@ import {UIEventSource} from "../UIEventSource";
|
|||
import LayerConfig from "../../Customizations/JSON/LayerConfig";
|
||||
import {GeoOperations} from "../GeoOperations";
|
||||
|
||||
/**
|
||||
* This is the part of the pipeline which introduces extra points at the center of an area (but only if this is demanded by the wayhandling)
|
||||
*/
|
||||
export default class WayHandlingApplyingFeatureSource implements FeatureSource {
|
||||
features: UIEventSource<{ feature: any; freshness: Date }[]>;
|
||||
|
||||
|
@ -46,6 +49,7 @@ export default class WayHandlingApplyingFeatureSource implements FeatureSource {
|
|||
continue;
|
||||
}
|
||||
|
||||
// Create the copy
|
||||
const centerPoint = GeoOperations.centerpoint(feat);
|
||||
centerPoint._matching_layer_id = feat._matching_layer_id;
|
||||
newFeatures.push({feature: centerPoint, freshness: f.freshness});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue