I have gotten a working model to do the addition and removal of layers as 
they meet or don't meet the requirements set forth in the wmc based
upon the MaxScaleDenominator as defined in the OGC WMC spec. For example 
if you zoom in where the scale is 1:100 and the MaxScaleDenominator is set 
to 99 for that layer,
the LayerControl widget will refresh and not show that layer. Then if you 
were to zoom into 1:98, the layer would return with the previous value of 
hidden or not. 
This also works with the MinScaleDenominotor.

Issue to be worked out if possible.

Right now in order to fire the events needed to refresh and remove the 
images on LayerControl.xsl I am using an image onerror event and giving it 
a faulty image source of "invalid" as seen below.

<img  src="invalid" id="vis_{$widgetId}_{$layerId}" 
onerror="{$context}.setHidden('{$layerId}',3)"/>

What I would like to do is embedd javascript into the xsl like this
 

<div>
    <script language="JavaScript" type="text/javascript">
                     <xsl:value-of select="$context" 
/><![CDATA[.setHidden("]]><xsl:value-of select="$layerId" 
/><![CDATA[",3);]]>
    </script>
</div>

This works great in Mozilla. In IE however it doesn't pick up and run the 
script. I cannot even get it to do a alert("hello"); within the script 
tags

If this image error is an acceptable way to handle it then the code is 
functioning, whoever I would like to make it cleaner and do the second 
approach.
Any Ideas would be appreciated. If further information is needed please 
let me know.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
mapbuilder-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel

Reply via email to