[Chameleon] User movable KeyMap in floating layer

Paul Spencer pspencer at dmsolutions.ca
Thu Jan 26 10:13:25 EST 2006


Carlo,

the problem you are running into is a fundamental flaw in how  
Chameleon's javascript stuff works in both MapDHTML and KeyMapDHTML.   
The original code was written several (4+) years ago and has not been  
updated since we started to learn how to take advantage of DOM  
manipulation in more advanced ways.  It would probably be quite  
tricky to get this to work the way the widget is written.  Sorry for  
the bad news :(

Cheers

Paul

On 24-Jan-06, at 8:16 PM, Carlo Tronnberg wrote:

> Hi there,
>
> I stumbled upon a problem: I want the user to be able to move  
> freely the KeyMapDHTML widget with the mouse.
>
> I have made a <div> based floating layer with a handle which the  
> user can drag around. I included the KeyMapDHTML widget in it with  
> the zooming and panning mini icons.
> When the page loads everything seems ok. But when I move the layer  
> around, the KeyMap stays on the same place. Just the frame layer  
> with the 2 buttons is moved.
>
> Is there a way to make the KeyMap follow my draggable layer?
>
> Greetings,
>
> Carlo
>
>
> PS: Here is the layer's code:
>
> <div id="boxHandle" class="box">
>  <div id="handle" class="handle">&nbsp;</div>
>  <table border="0" cellspacing="2" cellpadding="0">
>    <tr>
>      <!-- KEYMAP -->
>      <td colspan="2" align="left"><TABLE BORDER=0 CELLSPACING=0  
> CELLPADDING=0>
>    <TR>
>        <TD align="center">
>      <cwc2 type="KeyMapDHTML" image="images/world_key.png" />
>      <cwc2 type="KeyMapDHTMLMode" image="icons/icon_mini_zoom.png"  
> imagewidth="9" imageheight="9" styleresource="MiniButton"  
> mode="zoom" toolset="keymap" default="true">
>      <image state="normal"/>
>      <image state="hover"/>
>      <image state="selected">
>      </cwc2>
>      <cwc2 type="KeyMapDHTMLMode" image="icons/icon_mini_pan.png"  
> imagewidth="9" imageheight="9" styleresource="MiniButton"  
> mode="recenter" toolset="keymap">
>      <image state="normal"/>
>      <image state="hover"/>
>      <image state="selected">
>        </cwc2></TD>
>    </TR>
>    </TABLE>
>      </td>
>    </tr>
>  </TABLE>
> </div>
> _______________________________________________
> 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