Conversation
waxlamp
left a comment
There was a problem hiding this comment.
I think I found a bug... and I have one style suggestion. Let me know what you think.
| features: ['quad'], | ||
| autoshareRenderer: false, | ||
| }); | ||
| renderer: 'canvas', |
There was a problem hiding this comment.
Shouldn't this say webgl here?
If yes, then I'd also recommend creating a boolean value (bigImage or something like that) and using a ternary conditional expression right in the renderer entry definition. This would avoid defining a default and then mutating it on (slightly) complex logic -- I think that would make the code more legible.
There was a problem hiding this comment.
Thanks, by default it didn't have a renderer and would default to webGL. I added in the default value and forgot to remove it.
I've updated to your suggestion, the formatting is caused by the annoying line length limit.
waxlamp
left a comment
There was a problem hiding this comment.
The only other thing I notice now is that you don't need the params variable any longer--you can supply that object literal to geoViewer.value.createLayer() directly.
Swaps the geoJS renderer from Webgl to Canvas when the image size exceeds 8192 (8k) in any dimension.
WebGL has a maximum texture size and this will allow larger images to be displayed in the renderer.