<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 then I use my funciton "AddSelection" and try to zoom setting the New
Extents with </font><font face="Verdana" size="2">goCWCJSAPI.oMap.SetExtents(x,y,x2,y2) function. In my opinion the
features don't highlight because the second function is called before the first
is over, but I don'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> that
is more sure, but I don't know where to put 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'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 <<a href="mailto:jlacroix@mapgears.com">jlacroix@mapgears.com</a>>:</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="true"<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> ><br> > Hi,<br> > I write again and I hope somebody is going to answer me...<br> > Now I use this function but it works only with Point layer and if I try<br>
> to zoom after or before it doesn't work...<br> > function addSelection(nX ,nY,nX2 ,nY2){<br> > var queryCoords = nX + "," + nY + "," + nX2 + "," + nY2;<br> > var img = CWCDHTML_GetImage( 'MapLayerDivImg' );<br>
> var str_gMap=gMapDHTMLURL .split("&UniqId=");<br> > mg.src = str_gMap[0] + "&run_query=1&gszQueryCoords=" + queryCoords ;<br> > window.status = img.src;<br> > goCWCJSAPI.oMap.Refresh();<br>
> }<br> ><br> > I also have tried with this function that create a new layer with a<br> > point using the existing jsapi function but it doesen't work for me.<br> > function AddSel(nX ,nY,szName){<br> > goCWCJSAPI.oMap.CreateNewLayer("tmp_"+szName, "POINT", 1);<br>
> goCWCJSAPI.RefreshMap();<br> > // var layer_orig=goCWCJSAPI.oMap.GetLayerByName(szName);<br> > var layer_sel=goCWCJSAPI.oMap.GetLayerByName('tmp_'+szName);<br> > // layer_sel=layer_orig;<br>
> var p=new CWCPoint();<br> > p.x=nX ;<br> > p.y=nY;<br> > p.symbol=0;<br> > p.symbol_size=40;<br> > p.symbol_color="255,0,100";<br> > p.symbol_outlinecolour = "255,255,255";<br>
> //layer_sel.SetStatus()="ON";<br> > goCWCJSAPI.oMap.GetLayerByName('tmp_'+szName).SetStatus("ON");<br> > layer_sel.SetProjection="epsg:26591";<br> > layer_sel.Promote();<br>
> goCWCJSAPI.oMap.AddPoint("tmp_"+szName, p);<br> > }<br> ><br> > I think that the right way to approch to the problem is this<br> <br>> <<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>><br>
> <<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> > I am not able to make it work. I wait for some pieces of advice!<br>
> Tanks Federica.<br> ><br> > Hi everybody,<br> > I'm working on how to highlight elements in map. I need a function to do<br> ><br> > this from a popup and from the same form of the map. I find out this<br>
> <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> ><br> > I'm not able to make it work.<br>
> I don't know where to put the php code, I also tried to use ajax but I get<br> > an error in php file on the final istruction:<br> ><br> > $_SESSION["gszCurrentState"] = $oMapSession->saveState();<br>
><br> > ... saveState() on a non-object ...<br> ><br> > maybe because I don't include or call any other chameleon file (but if I try<br> > I get many errors... maybe I include the wrong files...).<br> > Can you help me to make that example work or can you give me an idea on how<br>
><br> > to proceed to solve this problem?<br> ><br> > Thank you,<br> > Federica<br> ><br> ><br> <br>> ------------------------------------------------------------------------<br> ><br> > _______________________________________________<br>
> Chameleon mailing list<br> > <a href="mailto:Chameleon@lists.maptools.org">Chameleon@lists.maptools.org</a><br> > <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>