Fix wayhandling
This commit is contained in:
parent
774d9a6df0
commit
2d8f29c505
2 changed files with 10 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"id": "id",
|
||||
"id": "fritures",
|
||||
"title": {
|
||||
"nl": "Friturenkaart",
|
||||
"fr": "Carte des fritures"
|
||||
|
|
Loading…
Reference in a new issue