[Chameleon] Onmouseout Error
VanDyken, Matt
M.VanDyken at cityofholland.com
Fri Aug 5 14:55:33 EDT 2005
I Think I have this figured out.
It was a bug in Chameleon 2.0 there was a onmouseout variable set wrong in
the Maptips widget. This was fixed in the 2.2 release, however, loading the
2.2 release breaks the linking to a webpage functionality. So I just
modified the 2.0 version of the widget with the variable fixed.
Hope this helps someone.....
Matt
Thanks for the Javascript work around Idea bill, but I had to figure it
out.....
-----Original Message-----
From: William Bronsema [mailto:wbronsema at dmsolutions.ca]
Sent: Wednesday, August 03, 2005 11:14 AM
To: 'VanDyken, Matt'
Cc: chameleon at lists.maptools.org
Subject: RE: [Chameleon] Onmouseout Error
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=" "
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=" " 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