Fix wayhandling

This commit is contained in:
Pieter Vander Vennet 2020-10-19 13:23:09 +02:00
parent 774d9a6df0
commit 2d8f29c505
2 changed files with 10 additions and 2 deletions

View file

@ -107,8 +107,16 @@ export class FilteredLayer {
const selfFeatures = [];
for (let feature of geojson.features) {
// feature.properties contains all the properties
const tags = TagUtils.proprtiesToKV(feature.properties);
const tags = TagUtils.proprtiesToKV(feature.properties);
const centerPoint = GeoOperations.centerpoint(feature);
if (feature.geometry.type !== "Point") {
if (this._wayHandling === LayerDefinition.WAYHANDLING_CENTER_AND_WAY) {
selfFeatures.push(centerPoint);
} else if (this._wayHandling === LayerDefinition.WAYHANDLING_CENTER_ONLY) {
feature = centerPoint;
}
}
if (this.filters.matches(tags)) {
selfFeatures.push(feature);
} else {

View file

@ -1,5 +1,5 @@
{
"id": "id",
"id": "fritures",
"title": {
"nl": "Friturenkaart",
"fr": "Carte des fritures"