Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interface for adding AND tags WHERE a condition is true #7

Open
burritojustice opened this issue May 7, 2019 · 0 comments
Open

interface for adding AND tags WHERE a condition is true #7

burritojustice opened this issue May 7, 2019 · 0 comments

Comments

@burritojustice
Copy link
Owner

burritojustice commented May 7, 2019

There are currently two operators that you can use to access tags in XYZ -- , for OR and + for AND.

Multiple tags of OR tags are easy to handle. AND gets trickier -- we effectively support two at the moment, though you can manually add more with + in the URL.

What is trickier is grouping ANDs with ORs to simulate a WHERE.

https://s3.amazonaws.com/xyz-demo/scenes/xyz_tangram/index.html?space=pcwNR9I9&token=AOsE9k2EdCdT8lEX12PDZ38&basemap=refill-dark&buildings=1&randomColors=0&points=0&lines=0&outlines=0&highlight=0&roads=1&water=0&tags=name%4036%2Coperated_by_name%40san_francisco_municipal_transportation_agency%2Cname%4033&property=vehicle_type#12.564472524535331/37.7568/-122.4332

In order to select the 38 and 48 bus lines from SF Muni in this dataset, we need to append operated_by_name@san_francisco_municipal_transportation_agency to each bus name@ tag.

tags=name@48+operated_by_name@san_francisco_municipal_transportation_agency,name@48,name@38+operated_by_name@san_francisco_municipal_transportation_agency,name@48

While I am wary about creating a query builder, a simple WHERE assistant using ANDs will be a powerful addition to selecting tags with OR.

Possible interface options:

  • add a where button next to and and or -- select your where first, and then your ORs 🤔
  • add a text box to type in the tag 😐
  • add a second column of checkboxes for WHERE 😰
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant