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

Programmatic access to source vectors #849

Closed
averas opened this issue Nov 23, 2014 · 1 comment
Closed

Programmatic access to source vectors #849

averas opened this issue Nov 23, 2014 · 1 comment

Comments

@averas
Copy link
Contributor

averas commented Nov 23, 2014

Would it make sense to be able to add/remove features of a vector source by other means than loading tiles or providing GeoJSON? This could for example be used to implement a bounding-box loading strategy not based on GeoJSON.

A related question is how one could carry out filtering of certain vector data based on user input. Do you guys see that rather than filtering the data (which again would be tricky on vector tiles) one would "hide" features by applying a style that for example made them transparent?

While on the subject of styling, how do you foresee that dynamic styling of subsets of vector data will be carried out in the future? I've looked at the example that switches classes, but say that you for example would like to highlight a subset of your vector data based on some attribute, how would that be done? Is there any way to change specific values in a style and have that reflected without reloading the style?

In my previous mapping applications I've worked with d3 to achieve automatic data-driven styling, and I would love if I somehow could hook in d3 here to avoid "discrete programmatic" styling.

@jfirebaugh
Copy link
Contributor

Hi @averas. I'll try to answer all your questions.

Would it make sense to be able to add/remove features of a vector source by other means than loading tiles or providing GeoJSON?

We don't plan to support data sources other than vector tiles or GeoJSON. If you want bounding-boxed loading, I would recommend making it GeoJSON based, or converting to GeoJSON on the client side (a la leaflet-omnivore.

how one could carry out filtering of certain vector data based on user input.

Yes, changing the style to make the filtered-out features non-visible is the recommended approach.

How do you foresee that dynamic styling of subsets of vector data will be carried out in the future?

There will eventually be style APIs beyond add/removeClass. See for example #146, #200, and #755.

Hope that helps!

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

2 participants