[ka-Map-users] Re: img.onload bug within IE?

Pg pg.navone at gmail.com
Tue Nov 21 10:58:53 EST 2006


Thanks.

Bye

2006/11/21, Wei Yang, Ng - Wayne <wayne at datalinktech.com.au>:
>
> Hi Pg,
>     I was wondering if you are aware of icons not getting drawn with
> kaXmlOverlay. This only happens within Internet Explorer and the problem
> is intermittent. Sometimes, while trying to draw many icons (20-50 or
> even 100), not all of them appeared. Apparently, if we look at the
> "kaXmlIcon.prototype.draw_canvas" function, there is this line where you
> specify an "img.onload" event. I did some tests and found that this
> event is not always being triggered which is why the "ctx.drawImage"
> function does not always get called. My website runs over https.
>
> Changing this:
> this.img.onload = function() {
>         ctx.drawImage(timg, dx, dy, tw, th);
>         ctx.restore();
> }
> to this:
>         ctx.drawImage(timg, dx, dy, tw, th);
>         ctx.restore();
>
> seems to make it work fine now.
>
> Cheers,
> Wayne
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20061121/c8c28b39/attachment.html


More information about the ka-Map-users mailing list