[Chameleon] mapDHTMLwidget occassionally fails

Paul Spencer pagameba at magma.ca
Fri Aug 27 08:21:23 EDT 2004


Bart,

I have yet to reproduce this problem so I have no timeline yet on fixing 
it, there is nothing that jumps out at me as being obviously wrong.

I don't think there will be any changes in the way chameleon loads maps 
for the next version, although I would like to add more robust error 
handling ...

Paul

bartvde at xs4all.nl wrote:

> 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.)
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
> 
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           pspencer at dmsolutions.ca   |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------



More information about the Chameleon mailing list