Comments (2)
Great question! In general everything is combined with AND, but with an important exception (which I'll get to).
In the first case you have:
amenity=bicycle_rental
bicycle_rental=docking_station
capacity=
and these will all be combined with AND, so all three need to match.
In the second case you have:
amenity=bicycle_parking
capacity:cargo_bike=
cargo_bike=
and again these are all combined with AND, which is probably not what you want. To get the OR result you want you'll have to write two different quests. (However, looking at this I realize that the code could probably be made smart enough to notice that the tagKeys
array lists both the items you're filtering on, which means that you want to set both of those keys and they should probably use an OR. Let me work on that!)
Moving on, what is the exception? There are situations where using AND doesn't make any sense and we can conclude that OR is necessary. If you have a key duplicated using an = relation with different values then using AND will never be true, so we infer that it is an OR:
amenity=cafe
amenity=restaurant
website=
In this situation the amenity values would be ORs, and the result of that would be AND everything else.
Except there's exception to this exception! We only convert multiple values to OR when the relation is =. If the relation is ≠ then it's non-sensical to use OR (because it would always be true):
amenity≠cafe
amenity≠restaurant
website=
In this case the amenity values would use AND.
Hope that helps!
from gomap.
It helps a lot. I see two approaches. You can make the code a bit smarter, or let the user decide :)
At least for the expanded quest build. But I am sure you will find a good solution :)
Thanks for clarification.
from gomap.
Related Issues (20)
- JSON Import for custom Quests HOT 2
- POI icon stretched
- Moving a way is very laggy HOT 5
- Darking “Add Note” button when “Notes and Fixmes” is off HOT 2
- Raster maps on iPad (and maybe Mac) should be zoomed out HOT 1
- Unable to open note while in Americana HOT 4
- Note header not visible in dark mode HOT 1
- Filter Objects Being Downloaded/Cached HOT 1
- Tags should be highlighted red when deprecated (and similar) HOT 2
- Style: border missing after node HOT 2
- Increase the + button size HOT 2
- Problems with some Fields in the Editor HOT 14
- App bricht zusammen HOT 3
- App translation unclear HOT 2
- Reordering geojson crashes app HOT 1
- App crash on [m|ft] HOT 1
- Adding more imagery but optional
- Ability to search wiki
- Clarification on Resolve with comment
- Option to disable request for rating
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gomap.