thanks Paul, I will try that later...<br><br>Tómas,<br><br>You have to create an array for the options:<br><br>var options = {}; <br>options.selectionType = 'INTERSECTS';<br>options.geometry = "POLYGON((-75.58840579710144 -10.755072463768112,
-61.16086956521739 -10.755072463768112, -61.16086956521739
0.005797101449276809, -75.58840579710144 0.005797101449276809,
-75.58840579710144 -10.755072463768112))";<br> options.maxFeatures = 0;<br> options.filter = "gid=1"<br> options.layers = 'States';<br><br><b>BUT, </b>Fusion doesn't use the options.filter yet... to make a query by filter you need to change a line code of the query.php file (Fusion\mapserver|mapguide\php\query.php):<br>
search for the line bellow at the code (it only query by shape):<br>if (@$oLayer->queryByShape($oSpatialFilter) == MS_SUCCESS) {<br><br>change it to:<br>if (@$oLayer->queryByAttributes($field, $filter, MS_MULTIPLE) == MS_SUCCESS) {<br>
<br><br><br>see you<br><br><br><br><div class="gmail_quote">On Fri, Jun 6, 2008 at 6:30 AM, Tómas Guđmundsson <<a href="mailto:tomas@snertill.is">tomas@snertill.is</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
In related matters, does anyone know of a resource that can tell me how to query? I do have a certain layer or a certain map I want to query against, but I don't know the format of a query string for map.query(). I see that Paul sent some options so maybe I need an options variable to search by ? Is there anywhere in the fusion code where this is done so I can see what parameters options has ?<br>
<br>
Rgds<br>
<font color="#888888">Tómas<br>
</font><div><div></div><div class="Wj3C7c"><br>
-----Original Message-----<br>
From: <a href="mailto:fusion-users-bounces@lists.osgeo.org">fusion-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:fusion-users-bounces@lists.osgeo.org">fusion-users-bounces@lists.osgeo.org</a>] On Behalf Of Paul Spencer<br>
Sent: 6. júní 2008 01:37<br>
To: Vitor Fortunato<br>
Cc: <a href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><br>
Subject: Re: [fusion-users] calling query() method from another window<br>
<br>
Hi Vitor,<br>
<br>
you need to get the map in a slightly different way:<br>
<br>
var map = window.opener.Fusion.getWidgetById('map'); //or whatever<br>
your map div id is<br>
map.query(options);<br>
<br>
Cheers<br>
<br>
Paul<br>
<br>
On 5-Jun-08, at 8:40 PM, Vitor Fortunato wrote:<br>
<br>
> Hi list!<br>
><br>
> I am trying to call the query() method from a new window opened by a<br>
> widget.<br>
> In execute method of the widget I have the code bellow:<br>
><br>
> execute : function() {<br>
> var Url = 'qb.html';<br>
> winQb = window.open(Url, 'New window',<br>
> 'toolbar<br>
> =<br>
> no<br>
> ,menubar<br>
> =<br>
> no<br>
> ,location<br>
> =no,resizable=yes,status=yes,scrollbars=yes,width=900,height=540');<br>
> }<br>
><br>
><br>
> when the widget is executed it pops up a new window. I am trying to<br>
> execute the query method from this new window. I've tried to code<br>
> something, but still with no success:<br>
> code of the new window:<br>
> <script><br>
> var options = {};<br>
> options.filter = 'gid in (1, 2, 3)';<br>
> options.layers = 'Estados';<br>
><br>
> window.opener.Fusion.Widget.Map.query(options);<br>
><br>
> //also tried to get the caller widget:<br>
> // var myWidObj = new window.opener.Fusion.Widget.Pqb();<br>
> </script><br>
><br>
> thanks in advance<br>
> _______________________________________________<br>
> fusion-users mailing list<br>
> <a href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/mailman/listinfo/fusion-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fusion-users</a><br>
<br>
<br>
__________________________________________<br>
<br>
Paul Spencer<br>
Chief Technology Officer<br>
DM Solutions Group Inc<br>
<a href="http://www.dmsolutions.ca/" target="_blank">http://www.dmsolutions.ca/</a><br>
<br>
_______________________________________________<br>
fusion-users mailing list<br>
<a href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/fusion-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/fusion-users</a><br>
</div></div></blockquote></div><br>