[Chameleon] Widget Update and JSAPI
Fernando Sánchez García
nando_gcia at hotmail.com
Wed Jul 16 03:34:46 EDT 2008
Hello list, I'm a user of Mapserver and Chameleon and I have a little problem with the Widget Update on the mode JSAPI which has already been mentioned in the Community, but it can not operate. The problem is that when you update the map on JSAPI mode on Internet Explorer 6 or 7 and refresh the entire screen and should only refresh the map. In Firefox or Opera this does not happen. I have the Mapserver 4 Windows 2.2.7 and Chameleon 2.6RC1. We ask for help fix it. Thank you very much.My file is legend_template.html:[leg_layer_html order=ascending opt_flag=15] <tr bgcolor="#F7D481"> <!-- <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('[leg_layer_name]', true)"[if name=selected value=1] CHECKED[/if]
</td> -->
<td align="center"><input type="checkbox" name="legendlayername[]" value="[leg_layer_name]" onclick="ChangeLayerStatus('[leg_layer_name]')" [if name=layer_status oper=eq value=1]CHECKED[/if] [if name=layer_status oper=eq value=2]CHECKED[/if]></td> <td align="center"><img src="[leg_icon width=20 height=18]" width="20" height="18"></td> [if name=wms_name oper=isnull] <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span class="label">[leg_layer_name]</span></a></td> </tr> [/if] [if name=wms_name oper=isset] <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span class="label">[metadata name=WMS_TITLE]</span></a></td> </tr> [/if][/leg_layer_html]My template iss: <body onload="CWC2OnLoadFunction()">..... <cwc2 type="cwcjsapi" debug="false"/> <cwc2 type="SharedResource" name="CWCJSAPI"/>....<div id="LegendLayer" name="LegendLayer"><table border="0" bgcolor="#FDF6DA"> <tr> <td colspan="4" align="center"> <cwc2 type="LegendTemplate" visible="true" embedded="true" template="legend_template.html" popupstyleresource="TextButtons" popupwidth="500" popupheight="400" status="false" menubar="false" controlvisibility="true"/> </cwc2></td></tr><tr> <td colspan="4" align="center"> <cwc2 type="UpdateMap" styleresource="TextButtons" visible="true" image="icons/icon_update.png" imagetip="Actualizar Mapa" label="Actualizar Mapa"><image state="normal"/><image state="selected"/><image state="hover"/> </cwc2></td></tr>
<!-- include the javascript code that manages the DHTML layers --> <script language="JavaScript" src="sample.js" type="text/javascript"> </script>
.....And mi file sample.js is:function ChangeLayerStatus(szLayerName){ if(typeof goCWCJSAPI == "undefined") { return false; } szStatus = goCWCJSAPI.oMap.GetLayerByName(szLayerName).GetStatus(); //alert('status='+szStatus) if(szStatus == "ON") { szNewStatus = "OFF"; } else { szNewStatus = "ON"; } goCWCJSAPI.oMap.GetLayerByName(szLayerName).SetStatus(szNewStatus);}Fernando Sánchez GarcíaSIG-UCO Universidad de CórdobaDept. Ingeniería Gráfica E Ingeniería Y Sist. Información CartográficaEdificio Gregor Mendel C5 - 3ª Pta.Campus Universitario de Rabanales. Ctra. N-IV a km. 39614071 CÓRDOBA (España).
_________________________________________________________________
Sigue en directo todas las competiciones deportivas en MSN Deportes
http://deportes.es.msn.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20080716/94622690/attachment-0001.html
More information about the Chameleon
mailing list