-
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
Changes from 4 commits
4f69a44
ea57f7b
eb81d5e
84777ad
5f41066
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -369,8 +369,8 @@ $(function () { | |
} | ||
); | ||
|
||
// Create a feature layer to draw on | ||
layer = map.createLayer('feature'); | ||
// Create a feature layer to draw on. | ||
layer = map.createLayer('feature', {features: ['line.multicolor']}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is line.multicolor refers to? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see now that you have added options at the time of registration. Interesting idea but now we have to make sure we are consistent about it and document it as well. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our gl lines can vary color from point to point. The d3 lines can't. We probably should document the feature capabilities in the base feature. |
||
|
||
// Create a line feature | ||
feature = layer.createFeature('line', {selectionAPI: true}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -143,5 +143,5 @@ var canvas_quadFeature = function (arg) { | |
inherit(canvas_quadFeature, quadFeature); | ||
|
||
// Now register it | ||
registerFeature('canvas', 'quad', canvas_quadFeature); | ||
registerFeature('canvas', 'quad', canvas_quadFeature, {clr: false, img: true, 'img-full': false}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. could we change clr to color please? clr sometime could be confused with clear. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @manthey how do control and maintain this vocabulary? May we should make it part of public interface of baseclass (keys) and then the derived classes can just refer to it like this:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sounds reasonable. The base class can document what the keys mean, too. I'll make those changes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. great, thanks for the consideration @manthey |
||
module.exports = canvas_quadFeature; |
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