Christopher <christopher.oestlund@...> writes: > > From my experiments, that last example wont work. > > final Image image = new Image(mapResources.map()); > > That line makes GWT try to use a sprite sheet, making the <img> use > style="background:" to display the image. Such an Image won't be shown > when drawn on the canvas. I have to force gwt to use the src="" by > doing: > > final Image image = new Image(mapResources.map().getURL()); > > I guess the proper solution would be to have GWT export the sprite > sheets it generates, and then use the proper canvas draw method to > draw that portion of the sheet. >
Thanks for the suggestion, Christopher. I was having the same issue, but got it working after reading your suggestion. I might offer a slight improvement, which is to avoid the deprecated getURL() method in favor of the getSafeUri() call instead. final Image image = new Image(mapResources.map().getSafeUri()); This worked perfectly for me. Thanks, Rob -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
