RE: [Chameleon] Widget Update‏ and JSAPI

Nolte, Tim Tim.Nolte at ipcswirelessinc.com
Wed Jul 16 08:14:38 EDT 2008


Honestly, I don't know if you want to bother with trying to use JSAPI mode in Chameleon. That was my original goal about a year ago, and while I did get some help with getting some things to work there are really too many widgets that don't work right in JSAPI mode. I basically abandoned trying to go with JSAPI mode. I'm now moving our MapServer to the Fusion(MapGuide) framework. So far I've been able to get just about everything I needed that was standard in about a day. I still need to build a couple of my own custom widgets (yes they are called that there too). The amount of documentation still seems a little sparse, but not really that much more than Chameleon is. The other thing about Fusion is that it is a JavaScript/AJAX application right out of the box, and it has very active development. There hasn't been a new release of Chameleon for the last 10 months, so I don't see there being much of an active community of developers. You'll find Fusion at:

	http://trac.osgeo.org/fusion


----
Timothy J Nolte - tnolte at ilpcs.com
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com 

> -----Original Message-----
> From: chameleon-bounces at lists.maptools.org 
> [mailto:chameleon-bounces at lists.maptools.org] On Behalf Of 
> Fernando Sánchez García
> Sent: Wednesday, July 16, 2008 3:35 AM
> To: chameleon at lists.maptools.org
> Cc: nando_gcia at hotmail.com
> Subject: [Chameleon] Widget Update‏ and JSAPI
> 
> 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ía
> SIG-UCO Universidad de Córdoba
> Dept. Ingeniería Gráfica E Ingeniería Y Sist. Información Cartográfica
> Edificio Gregor Mendel C5 - 3ª Pta.
> Campus Universitario de Rabanales. Ctra. N-IV a km. 396
> 14071 CÓRDOBA (España). 
> 
>  
> 
> 
> ________________________________
> 
> ¡El Mundo Messenger te espera! Entra ya en "I love Messenger" 
> y descubre las últimas novedades, trucos, emoticonos… Entra 
> ya en "I love Messenger" <http://www.vivelive.com/ilovemessenger/> 
> 



More information about the Chameleon mailing list