[Chameleon] Map refresh slower at bigger scale - Update Map without submit

Federica De Martin federica.demartin at gmail.com
Tue Oct 14 03:49:11 EDT 2008


 Thank you Normand,

Finally I've discovered that what i need to make the MapSize Widget work was
the MapDhtml upated up to 2.6 version beyond the UpdateMap.php and the
cwcjsapi.js files. I hope that there will be no problem with the use of
other widgets, like maptips, because I will have to add them in the
application in future.

Chameleon Archive is lately not browsable; hope you recive this message.
Federica


2008/10/8 Normand Savard <nsavard at mapgears.com>

> Federica De Martin wrote:
>
>> Thank you Normand,
>> I downloaded the last version of chameleon with cvs but I haven't found
>> any
>> difference with the files in chameleon 2.6 rc1, in the three files I
>> modified. Can you suggest me the other files that need to be changed? ...
>> because I don't want to update directly all the application...
>>
>>
>>
> Federica,
>
> I thought I had committed the changes.  Sorry.
>
> Add the "if" clause in myOnLoad() function of the main template.
>
>
> <script language="JavaScript" type="text/javascript">
> function myOnLoad()
> {
>  CWC2OnLoadFunction()
>
>  if(typeof goCWCJSAPI != "undefined")
>  {
>   goCWCJSAPI.RegisterEvent(MAP_SIZE_CHANGED, "LayerAdjustSize");
>  }
>
> }
> </script>
>
> Than I the following code in sample.js:
> /**
> *
> * called to position the keymap when the map image is resized
> */
> function KeyMapWComputeKeyMapPosition()
> {
>   if (document.layers) //Netscape 4.x
>   {
>       gKeyMapWhspc = document.images['keymapFrameTL'].x;
>       gKeyMapWvspc = document.images['keymapFrameTL'].y;
>   }
>   else
>   {
>       gKeyMapWhspc = CWCDHTML_FindObjectPosX(
> document.getElementById('keymapFrameTL'));
>       gKeyMapWvspc = CWCDHTML_FindObjectPosY(
> document.getElementById('keymapFrameTL'));
>   }
>
>   gKeyMapWhspc+=1;
>   gKeyMapWvspc+=1;
>
> }
>
>
> /**
> * {$szJsFunctionName}
> * called to position the keymap when the map image is resized
> * It also position the background image layer and the zoom layers.
> */
> function KeyMapWPositionKeyMapDHTML()
> {
>   KeyMapWComputeKeyMapPosition();
>
>   var oLayer = CWCDHTML_GetLayer("KeyMapLayerDiv");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
>
>   var oLayer = CWCDHTML_GetLayer("KeyMapLayerBG");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
>
>   var oLayer = CWCDHTML_GetLayer("zKeyMapBoxLeft");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
>
>   var oLayer = CWCDHTML_GetLayer("zKeyMapBoxRight");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
>
>   var oLayer = CWCDHTML_GetLayer("zKeyMapBoxTop");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
>
>   var oLayer = CWCDHTML_GetLayer("zKeyMapBoxBottom");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
>
>   var oLayer = CWCDHTML_GetLayer("zKeyMap2BoxLeft");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
>
>   var oLayer = CWCDHTML_GetLayer("zKeyMap2BoxRight");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
>
>   var oLayer = CWCDHTML_GetLayer("zKeyMap2BoxTop");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
>
>   var oLayer = CWCDHTML_GetLayer("zKeyMap2BoxBottom");
>   oLayer.left = gKeyMapWhspc;
>   oLayer.top = gKeyMapWvspc;
> }
>
> function LayerAdjustSize()
> {
>   LayerSetSizeInit();
>   // Set the KeyMap position based on the ReferenceLayer
>   KeyMapWPositionKeyMapDHTML();
> }
>
> I attached the modified files, the widget definition and UpdateMap.php just
> in case.
>
> Norm
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20081014/124c228e/attachment.html


More information about the Chameleon mailing list