[Chameleon] Highlight search result in map
Federica De Martin
federica.demartin at gmail.com
Thu Mar 27 08:22:03 EDT 2008
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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20080327/9a33a4cc/attachment.html
More information about the Chameleon
mailing list