Add better relation support

This commit is contained in:
Pieter Vander Vennet 2021-04-18 14:24:30 +02:00
parent 7b47af8978
commit 12afdcab75
18 changed files with 2637 additions and 2386 deletions

View file

@ -53,6 +53,7 @@ The above code will be executed for every feature in the layer. The feature is a
* distanceTo
* overlapWith
* closest
* memberships
### distanceTo
@ -71,4 +72,8 @@ Gives a list of features from the specified layer which this feature overlaps wi
Given either a list of geojson features or a single layer name, gives the single object which is nearest to the feature. In the case of ways/polygons, only the centerpoint is considered.
* list of features
* list of features
### memberships
Gives a list of {role: string, relation: Relation}-objects, containing all the relations that this feature is part of. For example: \`\_part\_of\_walking\_routes=feat.memberships().map(r => r.relation.tags.name).join(';')\`