<div><font face="Verdana" size="2">Hi, always me, Federica. Thank you Julien for the 
fast answer.</font></div>
<div><font face="Verdana" size="2">The Highlight works fine for me in the query 
widget, also between zoom. My problem is when I make a search with some php code 
and&nbsp;then I use my funciton &quot;AddSelection&quot; and try to zoom setting the New 
Extents&nbsp;with </font><font face="Verdana" size="2">goCWCJSAPI.oMap.SetExtents(x,y,x2,y2) function. In my opinion the 
features don&#39;t highlight because the second function is called before the first 
is over, but I don&#39;t know how to correct it.</font></div>
<font face="Verdana" size="2">Finally I prefer to make something via php like 
this one </font><font face="Verdana" size="2"><a href="http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html</a>&nbsp;that 
is more sure, but I don&#39;t know where to put&nbsp;the php code to make it work. I also 
tried to put it in the function ParseUrl (that I have added) in the 
Update.widget.php but it doesn&#39;t work, <br>any suggestion?<br><br>Thanks.<br><br>Federica</font><br><br><div><span class="gmail_quote">2008/3/27, Julien-Samuel Lacroix &lt;<a href="mailto:jlacroix@mapgears.com">jlacroix@mapgears.com</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br> <br> Do the Chameleon samples work?<br> If they work, you can try to go in sample_basic.phtml and<br> sample-basic_jsapi.phtml and add the following parameter to the Query<br> widget:<br> HighlightResults=&quot;true&quot;<br>
 <br> This should highlight the result of your query and keep it highlighted<br> between zoom.<br> <br> Is that what you were looking for?<br> <br> Julien<br> <br> PS: If sample_basic.phtml works and not sample_basic_jsapi.phtml you may<br>
 need to install Chameleon 2.6rc1.<br> <br><br> Federica De Martin wrote:<br> &gt;<br> &gt; Hi,<br> &gt; I write again and I hope somebody is going to answer me...<br> &gt; Now I use this function but it works only with Point layer and if I try<br>
 &gt; to zoom after or before it doesn&#39;t work...<br> &gt; function addSelection(nX ,nY,nX2 ,nY2){<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;var queryCoords = nX + &quot;,&quot; + nY + &quot;,&quot; + nX2 + &quot;,&quot; + nY2;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;var img = CWCDHTML_GetImage( &#39;MapLayerDivImg&#39; );<br>
 &gt;&nbsp;&nbsp;&nbsp;&nbsp;var str_gMap=gMapDHTMLURL .split(&quot;&amp;UniqId=&quot;);<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;mg.src = str_gMap[0] + &quot;&amp;run_query=1&amp;gszQueryCoords=&quot; + queryCoords ;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;window.status = img.src;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp;goCWCJSAPI.oMap.Refresh();<br>
 &gt; }<br> &gt;<br> &gt; I also have tried with this function that create a new layer with a<br> &gt; point using the existing jsapi function but it doesen&#39;t work for me.<br> &gt; function AddSel(nX ,nY,szName){<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; goCWCJSAPI.oMap.CreateNewLayer(&quot;tmp_&quot;+szName, &quot;POINT&quot;, 1);<br>
 &gt;&nbsp;&nbsp;&nbsp;&nbsp; goCWCJSAPI.RefreshMap();<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; // var layer_orig=goCWCJSAPI.oMap.GetLayerByName(szName);<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; var layer_sel=goCWCJSAPI.oMap.GetLayerByName(&#39;tmp_&#39;+szName);<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; // layer_sel=layer_orig;<br>
 &gt;&nbsp;&nbsp;&nbsp;&nbsp; var p=new CWCPoint();<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; p.x=nX ;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; p.y=nY;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; p.symbol=0;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; p.symbol_size=40;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; p.symbol_color=&quot;255,0,100&quot;;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; p.symbol_outlinecolour = &quot;255,255,255&quot;;<br>
 &gt;&nbsp;&nbsp;&nbsp;&nbsp; //layer_sel.SetStatus()=&quot;ON&quot;;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; goCWCJSAPI.oMap.GetLayerByName(&#39;tmp_&#39;+szName).SetStatus(&quot;ON&quot;);<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; layer_sel.SetProjection=&quot;epsg:26591&quot;;<br> &gt;&nbsp;&nbsp;&nbsp;&nbsp; layer_sel.Promote();<br>
 &gt;&nbsp;&nbsp;&nbsp;&nbsp; goCWCJSAPI.oMap.AddPoint(&quot;tmp_&quot;+szName, p);<br> &gt; }<br> &gt;<br> &gt; I think that the right way to approch to the problem is this<br> <br>&gt; &lt;<a href="http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html">http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html</a>&gt;<br>
 &gt; &lt;<a href="http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html">http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html</a>&gt;but<br> &gt; I am not able to make it work. I wait for some pieces of advice!<br>
 &gt; Tanks Federica.<br> &gt;<br> &gt; Hi everybody,<br> &gt; I&#39;m working on how to highlight elements in map. I need a function to do<br> &gt;<br> &gt; this from a popup and from the same form of the map. I find out this<br>
 &gt; <a href="http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html">http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html</a> but<br> &gt;<br> &gt; I&#39;m not able to make it work.<br>
 &gt; I don&#39;t know where to put the php code, I also tried to use ajax but I get<br> &gt; an error in php file on the final istruction:<br> &gt;<br> &gt; $_SESSION[&quot;gszCurrentState&quot;] = $oMapSession-&gt;saveState();<br>
 &gt;<br> &gt; ... saveState() on a non-object ...<br> &gt;<br> &gt; maybe because I don&#39;t include or call any other chameleon file (but if I try<br> &gt; I get many errors... maybe I include the wrong files...).<br> &gt; Can you help me to make that example work or can you give me an idea on how<br>
 &gt;<br> &gt; to proceed to solve this problem?<br> &gt;<br> &gt; Thank you,<br> &gt; Federica<br> &gt;<br> &gt;<br> <br>&gt; ------------------------------------------------------------------------<br> &gt;<br> &gt; _______________________________________________<br>
 &gt; Chameleon mailing list<br> &gt; <a href="mailto:Chameleon@lists.maptools.org">Chameleon@lists.maptools.org</a><br> &gt; <a href="http://lists.maptools.org/mailman/listinfo/chameleon">http://lists.maptools.org/mailman/listinfo/chameleon</a><br>
 <br><br> --<br> Julien-Samuel Lacroix<br> Mapgears<br> <a href="http://www.mapgears.com/">http://www.mapgears.com/</a><br> </blockquote></div><br>