-
Notifications
You must be signed in to change notification settings - Fork 75
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
Create layers based on a list of features. #590
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Current coverage is 76.42%@@ master #590 diff @@
==========================================
Files 82 82
Lines 7219 7274 +55
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 5503 5559 +56
+ Misses 1716 1715 -1
Partials 0 0
|
🎉 will complete my review tomorrow but I liked what I reviewed so far |
Merged
'feature', | ||
{ | ||
renderer: 'vgl' | ||
features: ['choropleth'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Mostly looks great 😋 to me but I have one suggestion for discussions. |
…more clearly documented.
LGTM 🎉 |
@manthey should we go ahead and merge it? |
LGTM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, if you want to use a feature, you need to know what renderers in works in and manually check if those renderers are available on the current platform. If the renderer isn't available, we fall back to the null renderer, which is only useful for the tile layers.
With this change, you can ask for a new layer based on the features you want. If there are any renderers available that support all of the listed features, that renderer will be used. Furthermore, there is now an inherent preference in renderers in the order vgl -> canvas -> d3 -> null, so we'll fall back to a better renderer than the null renderer in many instances.
Features can have capabilities. For instance, the quad feature is only fully implemented in the vgl renderer. Image quads are mostly implemented in the d3 and canvas renderers (when the quad is a parallelogram). Color quads are implemented in the d3 renderer. If you ask for a layer that supports {features: ['quad']}, you could get any of the vgl, d3, or canvas renderers (based on the support of that renderer). If you ask for {features: ['quad.clr']}, you will only get either the vgl or d3 renderer. If you ask for {features: ['quad.img-full']}, only vgl will do.
Many examples have been updated to use this. This means that some examples will now work on more platforms (since they would only work if you have vgl, but now will work in other cases).