[Chameleon] mapDHTMLwidget occassionally fails

bartvde at xs4all.nl bartvde at xs4all.nl
Fri Aug 27 04:37:49 EDT 2004


Hi Jacob,

thanks. I'll give your fix a try.

Paul, since more people are experiencing these problems, has the cause of
this problem been identified and will it be fixed in the next Chameleon?
Will this change the way the Chameleon map load now works?

BTW Jacob: did you write the Dutch with an automatic translator, or you
actually speak it?

Best regards,
Bart

>
> Hi Bart,
>
> It's not really a fix, more like a cover-up. I did it for the 1.0.4
> version,
> but just now I managed to get a similar solution working for 1.99.
>
> For 1.99, in mapDHTMLwidget.js, add the following code at the end:
>
> --------------------------------------
> var backupURL = "";
> function imageErrorOccurred (mapurl)
>    {
>    //alert (mapurl);
>    document.images["MapLayerDivImg"].src =
> document.images["mapimage"].src;
>    backupURL = mapurl;
>    setTimeout("reloadImage()",500);
>    }
>
> function reloadImage()
>    {
>    document.images['MapLayerDivImg'].src = backupURL;
>    }
> ------------------------------------------
>
> Then place the following attribute in your MapLayerDivImg definition:
>
> onError=\"imageErrorOccurred(gMapDHTMLURL)\"
>
>
> What it does: when the image breaks, it immediately replaces the image
> source with that of the empty white pixel (to prevent the user from seeing
> a
> broken image), and after a small delay it loads the correct url into the
> image. It works for me.
>
> It's a slightly different implementation in version 1.0.4 (you'd have to
> modify mapDHTMLimage.widget.php). I'm not sure which one you're after, so
> I'll attach both files. Use the JS for 1.99, the php for 1.0.4.
>
> regards,
>
> Jacob
>
>
> P.S. Sorry voor de onmeundig lelijke PHP code. Geen idee wa'k doe in die
> taal. (Forgive me my ugly PHP coding. Have been too lazy to look for good
> tutorial.)
>
>
>
>
>
>
>
>
>
>
>
>
>



More information about the Chameleon mailing list