-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add additional sample layers #385
Conversation
7fc81bb
to
50feacd
Compare
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.
Old comments removed...
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.
There is a bug on commit 321f3b0, which is where this PR is based on. Please rebase the PR to latest dev.
50feacd
to
0efbdbd
Compare
@shaojingli Rebased. The label layer works now (but updates too frequently). |
@shaojingli Fixed the excessive update issue (was related to the sublayer not having a proper @Pessimistress This PR also contains bitmap and mesh layers, we'll need to pick some proper bitmaps and meshes to use in the example layers. The labels don't look that great for some reason, but at least this is a start. I suspect selecting a heavier font-weight will help. Should investigate if we can control anti-aliasing using this technique. |
@@ -77,9 +77,15 @@ export default class ChoroplethLayer extends Layer { | |||
attributeManager.invalidateAll(); | |||
} | |||
|
|||
if (oldProps.opacity !== props.opacity) { | |||
if (props.opacity !== oldProps.opacity) { |
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.
Don't need this any more?
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.
Don't need this any more?
Good catch. Removed.
} | ||
|
||
renderLayers() { | ||
return new IconLayer(Object.assign({}, this.props, { |
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.
IconLayer doesn't currently preserve aspect ratio. We should fix it in a separate PR.
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.
Assuming that we are going to provide a proper mesh / bitmap to mesh / bitmap layers, we can land this change.
5dfab6a
to
4fa9273
Compare
Agreed. I could try to scrounge something up but I have a feeling that it will look much nicer if @Pessimistress does it. If we don't get examples in place we can always remove these sample layers before we ship.
Good idea. I believe that I am passing through all props to the icon layer, so a 64bit prop should work if the IconLayer supports it. I added |
* Add additional sample layers, LabelLayer, MeshLayer, BitmapLayer, OutlinePolygonLayer * Working LabelLayer Example
@Pessimistress This is the label layer we talked about, plus a few others.
Note: this PR is for discussion only, not ready for final review. Also EnhancedChoroplethLayer commented out due to build issues.