forked from MapComplete/MapComplete
		
	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 = [];
 | 
					        const selfFeatures = [];
 | 
				
			||||||
        for (let feature of geojson.features) {
 | 
					        for (let feature of geojson.features) {
 | 
				
			||||||
            // feature.properties contains all the properties
 | 
					            // 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)) {
 | 
					            if (this.filters.matches(tags)) {
 | 
				
			||||||
                selfFeatures.push(feature);
 | 
					                selfFeatures.push(feature);
 | 
				
			||||||
            } else {
 | 
					            } else {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,5 @@
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  "id": "id",
 | 
					  "id": "fritures",
 | 
				
			||||||
  "title": {
 | 
					  "title": {
 | 
				
			||||||
    "nl": "Friturenkaart",
 | 
					    "nl": "Friturenkaart",
 | 
				
			||||||
    "fr": "Carte des fritures"
 | 
					    "fr": "Carte des fritures"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue