[Chameleon] Onmouseout Error

William Bronsema wbronsema at dmsolutions.ca
Wed Aug 3 11:14:09 EDT 2005


Hi Matt,

I see the error that you are getting on your site, but I'm not able to
reproduce it locally on my machine.  I am running the latest CVS version, so
that might have something to do with it (Note - there has been a major
language handling update recently to CVS so A LOT of files have changed -
there might be a quirk or two when doing an update ;) ).

I use a slightly different approach to accomplish essentially the same thing
with the MapTips widget.  I use custom javascript functions to popup my
window instead of the link method:

Sample tag:
<cwc2 type="MapTips" 
      visible="false" 
      defaulttext="&nbsp;" 
      tolerance="2" 
      maptipsdiv="MapTipsLayer" 
      label="Map Tips" 
      styleresource="TextButtons" 
      popupstyleresource="TextButtons" 
      popupwidth="500" 
      popupheight="450" 
      image="images/icon_maptips.png" 
      layer="postgres" 
      onmouseover="maptipsOver" 
      onmouseout="maptipsOut" 
      onclick="maptipsClick" 
      attributes="MyAttribute1, MyAttribute2">
          <image state="normal"/>
          <image state="selected"/>
          <image state="hover"/>
</cwc2>

BTW - even though I am defining an onmouseout function here, this works fine
without it too.

Then also in my template, I add the functions to do the work:

function maptipsClick( e, attributes )
{
    // add code here to popup a window to show the link
    ....
    ....
}

function maptipsOver( e, attributes )
.....

etc.

Note:  The "attributes" parameter in my custom "maptipsClick" function (and
others) is an array in this case because more than one attribute was
specified in the "attributes" parameter of the MapTips tag (ie.
"MyAttribute1, MyAttribute2").  If there was only one attribute specified
then it would be a string (I think).

Anyway, HTH.

Regards,
Bill

________________________________________________

William A. Bronsema, C.E.T.
Software & Applications Development,
DM Solutions Group Inc.

> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org [mailto:chameleon-
> bounces at lists.maptools.org] On Behalf Of VanDyken, Matt
> Sent: Wednesday, August 03, 2005 8:12 AM
> To: 'Paul Spencer'; VanDyken, Matt
> Cc: 'chameleon at lists.maptools.org'
> Subject: RE: [Chameleon] Onmouseout Error
> 
> Ok here is the link and the syntax of the cwc2 tag.
> 
> 
> http://gis.ci.holland.mi.us:81/myapp/index.phtml
> 
> 
> 
>       <!-- MAPTIPS -->
>       <td><cwc2 type="MapTips" defaulttext="&nbsp;" link="true"
> MAPTIPSDIV="LINK" Layer="Points_Of_Interest" linkurl="http://"
> linkuniqueid="LINK" tolerance="10" label="Map Tips"
> styleresource="TextButtons" popupstyleresource="TextButtons"
> popupwidth="500" popupheight="450" image="images/icon_maptips.png"
> visible="false">
>               <image state="normal"/>
>               <image state="selected"/>
>               <image state="hover"/>
>           </cwc2>
>       </td>
> 
> 
> 
> Your help is very greatly appreciated.
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon




More information about the Chameleon mailing list