<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>

<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi again.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I&#8217;ve just gotten back to this problem. What I tried to do is I
found a package in the map, and I used an identifier that we use which is
called TENGINR. I also noted a bounding box coordinates In x and y to pass
along.  This is my options array.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                var options = {};<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                options.selectionType = 'INTERSECTS';<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                options.geometry = &quot;POLYGON((-20020.500
12622.1736, -20020.500 13033.2695, -18907.7325 13033.2695, -18907.7325
0.005797101449276809, -75.58840579710144 12622.1736))&quot;;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                options.maxFeatures = 0;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                options.layers = 'hus'<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                options.filter = 'TENGINR = 100016700140';<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                this.getMap().query(options);<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Now, I&#8217;ve tried and debugged Query.php and this is what I get.
First we get the REQUEST array, which is correct.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Array<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>(<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [filter] =&gt; TENGINR = 100016700140<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [layers] =&gt; hus<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [mapname] =&gt; kopavogsbaer486217dfddd16<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [maxfeatures] =&gt; 0<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [session] =&gt;
d78d7550-ffff-ffff-8000-00000000b8fb_en_7F0000010AF20AF10AF0<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [spatialfilter] =&gt; POLYGON((-20020.500 12622.1736,
-20020.500 13033.2695, -18907.7325 13033.2695, -18907.7325
0.005797101449276809, -75.58840579710144 12622.1736))<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [variant] =&gt; INTERSECTS<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [PHPSESSID] =&gt;
d78d7550-ffff-ffff-8000-00000000b8fb-en-7F0000010AF20AF10AF0<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [_ASPXAUTH] =&gt; DCD7E4D6BF85EED759ED9B249B6C77897AEDA988CDA9FFF298FF3CE3E73D931EC2C777103B1DD88472C02B6CCAFD73086707A610D36F153DFCF1A2BE8FBFE00D1D6A48727480EA4333C38749AA8D720D<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [ASP_NET_SessionId] =&gt; rwjfzkuxr2t5x2mqtz2srhql<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Then I get this:<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>&lt;!-- filter: TENGINR = 100016700140 --&gt;<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>spatial filter is POLYGON((-20020.500 12622.1736, -20020.500
13033.2695, -18907.7325 13033.2695, -18907.7325 0.005797101449276809,
-75.58840579710144 12622.1736))&lt;BR&gt;stdClass Object<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>(<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [layers] =&gt; Array<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>        (<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>            [0] =&gt; hus<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>        )<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>    [hus] =&gt; stdClass Object<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>        (<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>            [propertynames] =&gt; Array<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                (<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [0] =&gt; TENGINR<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [1] =&gt; HEIMILISFAN<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                )<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>            [propertyvalues] =&gt; Array<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                (<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [0] =&gt; TENGINR<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [1] =&gt; HEIMILISFAN<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                )<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>            [propertytypes] =&gt; Array<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                (<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [0] =&gt; 9<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [1] =&gt; 9<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                )<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>            [numelements] =&gt; 0<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>            [values] =&gt; Array<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                (<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                )<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>            [metadatanames] =&gt; Array<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                (<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [0] =&gt; dimension<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [1] =&gt; bbox<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [2] =&gt; center<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [3] =&gt; area<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                    [4] =&gt; length<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>                )<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>        )<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>)<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>And finally I get the very disappointing result:  <o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>{&quot;hasSelection&quot;:false}<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I&#8217;m trying this with definitive values from the map and the map
layer but nothing happens. Can anyone spot what I&#8217;m doing wrong?<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards,<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Tómas.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Vitor Fortunato
[mailto:sapucaiatotal@gmail.com] <br>
<b>Sent:</b> 6. júní 2008 11:23<br>
<b>To:</b> Tómas Guđmundsson<br>
<b>Cc:</b> Paul Spencer; fusion-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [fusion-users] calling query() method from another window<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal style='margin-bottom:12.0pt'>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 = {};&nbsp;&nbsp;&nbsp; <br>
options.selectionType = 'INTERSECTS';<br>
options.geometry = &quot;POLYGON((-75.58840579710144 -10.755072463768112,
-61.16086956521739 -10.755072463768112, -61.16086956521739
0.005797101449276809, -75.58840579710144 0.005797101449276809,
-75.58840579710144 -10.755072463768112))&quot;;<br>
&nbsp;options.maxFeatures = 0;<br>
&nbsp;options.filter = &quot;gid=1&quot;<br>
&nbsp;options.layers = 'States';<br>
<br>
<b>BUT, </b>Fusion doesn't&nbsp; 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-&gt;queryByShape($oSpatialFilter) == MS_SUCCESS) {<br>
<br>
change it to:<br>
if (@$oLayer-&gt;queryByAttributes($field, $filter, MS_MULTIPLE) == MS_SUCCESS)
{<br>
<br>
<br>
<br>
see you<br>
<br>
<br>
<o:p></o:p></p>

<div>

<p class=MsoNormal>On Fri, Jun 6, 2008 at 6:30 AM, Tómas Guđmundsson &lt;<a
href="mailto:tomas@snertill.is">tomas@snertill.is</a>&gt; wrote:<o:p></o:p></p>

<p class=MsoNormal>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>
<span style='color:#888888'>Tómas</span><o:p></o:p></p>

<div>

<div>

<p class=MsoNormal><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>
&gt; Hi list!<br>
&gt;<br>
&gt; I am trying to call the query() method from a new window opened by a<br>
&gt; widget.<br>
&gt; In execute method of the widget I have the code bellow:<br>
&gt;<br>
&gt; execute : function() {<br>
&gt; &nbsp; &nbsp; var Url = 'qb.html';<br>
&gt; &nbsp; &nbsp; winQb = window.open(Url, 'New window',<br>
&gt; 'toolbar<br>
&gt; =<br>
&gt; no<br>
&gt; ,menubar<br>
&gt; =<br>
&gt; no<br>
&gt; ,location<br>
&gt; =no,resizable=yes,status=yes,scrollbars=yes,width=900,height=540');<br>
&gt; }<br>
&gt;<br>
&gt;<br>
&gt; when the widget is executed it pops up a new window. I am trying to<br>
&gt; execute the query method from this new window. I've tried to code<br>
&gt; something, but still with no success:<br>
&gt; code of the new window:<br>
&gt; &lt;script&gt;<br>
&gt; &nbsp; &nbsp; var options = {};<br>
&gt; &nbsp; &nbsp; options.filter = 'gid in (1, 2, 3)';<br>
&gt; &nbsp; &nbsp; options.layers = 'Estados';<br>
&gt;<br>
&gt; &nbsp; &nbsp; window.opener.Fusion.Widget.Map.query(options);<br>
&gt;<br>
&gt; &nbsp; &nbsp; //also tried to get the caller widget:<br>
&gt; &nbsp; &nbsp; // var myWidObj = new window.opener.Fusion.Widget.Pqb();<br>
&gt; &lt;/script&gt;<br>
&gt;<br>
&gt; thanks in advance<br>
&gt; _______________________________________________<br>
&gt; fusion-users mailing list<br>
&gt; <a href="mailto:fusion-users@lists.osgeo.org">fusion-users@lists.osgeo.org</a><br>
&gt; <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>
&nbsp; &nbsp;Paul Spencer<br>
&nbsp; &nbsp;Chief Technology Officer<br>
&nbsp; &nbsp;DM Solutions Group Inc<br>
&nbsp; &nbsp;<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><o:p></o:p></p>

</div>

</div>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>