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

Component export #54

Merged
merged 6 commits into from
Dec 9, 2016
Merged

Component export #54

merged 6 commits into from
Dec 9, 2016

Conversation

gmaclennan
Copy link
Member

@gmaclennan gmaclennan commented Dec 6, 2016

Export MapFilter as a React component, that can be imported and rendered.

Currently only expects one prop: features which should be an array of GeoJSON Point features.

See example/index.js for how to use. For now properties that are dates must be manually coerced to Date type.

Should merge #53 first

This is a little tricky because Mapbox filters do not work on arrays. Instead we flatten the array into:

arrayField.0: arrayValue0, arrayField.1: arrayValue1, arrayField.2: arrayValue2

Then pass the same filter to each of these and group with an ‘any’ filter.
This makes the whole thing self contained for export.
Only using woff for now, wouldn’t make sense to embed woff2 as well. Space difference is minor
@mojodna mojodna mentioned this pull request Dec 6, 2016
5 tasks
@gmaclennan gmaclennan merged commit 34b30e1 into rewrite Dec 9, 2016
@gmaclennan gmaclennan deleted the component-export branch December 9, 2016 21:02
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

Successfully merging this pull request may close these issues.

None yet

1 participant