[Chameleon] Highlight search result in map
Julien-Samuel Lacroix
jlacroix at mapgears.com
Thu Mar 27 10:18:22 EDT 2008
Hi,
Do the Chameleon samples work?
If they work, you can try to go in sample_basic.phtml and
sample-basic_jsapi.phtml and add the following parameter to the Query
widget:
HighlightResults="true"
This should highlight the result of your query and keep it highlighted
between zoom.
Is that what you were looking for?
Julien
PS: If sample_basic.phtml works and not sample_basic_jsapi.phtml you may
need to install Chameleon 2.6rc1.
Federica De Martin wrote:
>
> Hi,
> I write again and I hope somebody is going to answer me...
> Now I use this function but it works only with Point layer and if I try
> to zoom after or before it doesn't work...
> function addSelection(nX ,nY,nX2 ,nY2){
> var queryCoords = nX + "," + nY + "," + nX2 + "," + nY2;
> var img = CWCDHTML_GetImage( 'MapLayerDivImg' );
> var str_gMap=gMapDHTMLURL .split("&UniqId=");
> mg.src = str_gMap[0] + "&run_query=1&gszQueryCoords=" + queryCoords ;
> window.status = img.src;
> goCWCJSAPI.oMap.Refresh();
> }
>
> I also have tried with this function that create a new layer with a
> point using the existing jsapi function but it doesen't work for me.
> function AddSel(nX ,nY,szName){
> goCWCJSAPI.oMap.CreateNewLayer("tmp_"+szName, "POINT", 1);
> goCWCJSAPI.RefreshMap();
> // var layer_orig=goCWCJSAPI.oMap.GetLayerByName(szName);
> var layer_sel=goCWCJSAPI.oMap.GetLayerByName('tmp_'+szName);
> // layer_sel=layer_orig;
> var p=new CWCPoint();
> p.x=nX ;
> p.y=nY;
> p.symbol=0;
> p.symbol_size=40;
> p.symbol_color="255,0,100";
> p.symbol_outlinecolour = "255,255,255";
> //layer_sel.SetStatus()="ON";
> goCWCJSAPI.oMap.GetLayerByName('tmp_'+szName).SetStatus("ON");
> layer_sel.SetProjection="epsg:26591";
> layer_sel.Promote();
> goCWCJSAPI.oMap.AddPoint("tmp_"+szName, p);
> }
>
> I think that the right way to approch to the problem is this
> <http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html>
> <http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html>but
> I am not able to make it work. I wait for some pieces of advice!
> Tanks Federica.
>
> Hi everybody,
> I'm working on how to highlight elements in map. I need a function to do
>
> this from a popup and from the same form of the map. I find out this
> http://lists.maptools.org/pipermail/chameleon-dev/2005-May/003973.html but
>
> I'm not able to make it work.
> I don't know where to put the php code, I also tried to use ajax but I get
> an error in php file on the final istruction:
>
> $_SESSION["gszCurrentState"] = $oMapSession->saveState();
>
> ... saveState() on a non-object ...
>
> maybe because I don't include or call any other chameleon file (but if I try
> I get many errors... maybe I include the wrong files...).
> Can you help me to make that example work or can you give me an idea on how
>
> to proceed to solve this problem?
>
> Thank you,
> Federica
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
More information about the Chameleon
mailing list