<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 http-equiv=Content-Type content="text/html; charset=us-ascii">
<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;}
@font-face
        {font-family:Verdana;
        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:70.85pt 70.85pt 70.85pt 70.85pt;}
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=NL link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Hi Myeonghun,<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 lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I think with the rectangle used as a BBOx you could create a
BBOX filter and create a WFS layer for your buildings with that BBOX filter<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>This layer could have a separate style so the features are
highlighted.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Within this layer all information about the highlighted features
is available (if you set extractAttributes to true of course)<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>So you could show a popup on hover or so<o:p></o:p></span></p>

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

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

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

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

<p class=MsoNormal><span lang=EN-US 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 lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> Myeong Hun Jeong
[mailto:mhjeong74@gmail.com] <br>
<b>Sent:</b> Monday, April 27, 2009 2:09 PM<br>
<b>To:</b> Kris Geusebroek<br>
<b>Cc:</b> users@openlayers.org<br>
<b>Subject:</b> Re: [OpenLayers-Users] How to use OpenLayers requesting WFS
with Spatial Operations<o:p></o:p></span></p>

</div>

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

<div>

<p class=MsoNormal><span style='font-family:"Verdana","sans-serif"'>Thanks Kris
Geusebroek.</span><o:p></o:p></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><span style='font-family:"Verdana","sans-serif"'>In my case,
I loaded WMS building layer because WFS layer loading time is big.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-family:"Verdana","sans-serif"'>After
loading WMS layer, I draw rectangle on the map.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-family:"Verdana","sans-serif"'>After
drawing rectangle, what I want to do is that</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-family:"Verdana","sans-serif"'>I want to
get information for building features within the rectangle and </span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-family:"Verdana","sans-serif"'>I also
would like to&nbsp;select or highlight&nbsp;features&nbsp;within
the&nbsp;rectangle.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-family:"Verdana","sans-serif"'>What shoul
I do?</span><o:p></o:p></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal><span style='font-family:"Verdana","sans-serif"'>Best
regards,</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal><span style='font-family:"Verdana","sans-serif"'>Myeonghun
Jeong.</span><o:p></o:p></p>

</div>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><o:p>&nbsp;</o:p></p>

</div>

<div>

<p class=MsoNormal>2009/4/25 Myeong Hun Jeong &lt;<a
href="mailto:mhjeong74@gmail.com">mhjeong74@gmail.com</a>&gt;<o:p></o:p></p>

<div>

<p class=MsoNormal>Hi Roald,<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>There are two things I want to know.<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>1. How to send WFS requests to server with openlayers? I
know the way to load WFS layers when I initialize map, but after loading
layers, I don't know how to request WFS with Spatial Operations in OpenLayers.<o:p></o:p></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal>2. I also want to know the way to display a WFS layer on my
map that automatically requests the correct features within the BBOX of the
viewport?<o:p></o:p></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal>Thanks in advance.<o:p></o:p></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal>Best Regrards,<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>Myeonghun Jeong.<o:p></o:p></p>

</div>

<div>

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

</div>

<div>

<p class=MsoNormal>2009/4/25 Roald de Wit &lt;<a
href="mailto:roald.dewit@lisasoft.com" target="_blank">roald.dewit@lisasoft.com</a>&gt;
<o:p></o:p></p>

<div>

<div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;
margin-left:4.8pt;margin-right:0cm'>

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

<p class=MsoNormal>Hi Myeonghun Jeong,<br>
<br>
Can you explain what you try to do? Do you want to display a WFS layer on your
map that automatically requests the correct features within the BBOX of the
viewport or do you want to have control over what BBOX you send to the WFS
server and send your WFS 'manually'?<br>
<br>
Maybe it is good to have a look at some examples (type WFS in the search box):
[1].<br>
<br>
Regards, Roald<br>
<br>
[1] <a href="http://www.openlayers.org/dev/examples/" target="_blank">http://www.openlayers.org/dev/examples/</a><br>
<br>
Myeong Hun Jeong wrote:<o:p></o:p></p>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><br>
Dear list.<br>
<br>
I want to know how to use openlayers when I request WFS with Spatial
Operations.<br>
<br>
For example, at GeoServer Demo Request page, I can fin
WFS_getFeatureBBox01.1.url and WFS_getFeatureBBox01.1.xml samples.<br>
<br>
So, the request is that<o:p></o:p></p>

</div>

<p class=MsoNormal><a
href="http://localhost:8888/geoserver/wfs?request=GetFeature&amp;version=1.0.0&amp;typeName=topp:states&amp;propertyName=STATE_NAME,PERSONS&amp;BBOX=-75.102613,40.212597,-72.361859,41.512517"
target="_blank">http://localhost:8888/geoserver/wfs?request=GetFeature&amp;version=1.0.0&amp;typeName=topp:states&amp;propertyName=STATE_NAME,PERSONS&amp;BBOX=-75.102613,40.212597,-72.361859,41.512517</a>
&lt;<a
href="http://localhost:8888/geoserver/wfs?request=GetFeature&amp;version=1.0.0&amp;typeName=topp:states&amp;propertyName=STATE_NAME,PERSONS&amp;BBOX=-75.102613,40.212597,-72.361859,41.512517"
target="_blank">http://localhost:8888/geoserver/wfs?request=GetFeature&amp;version=1.0.0&amp;typeName=topp:states&amp;propertyName=STATE_NAME,PERSONS&amp;BBOX=-75.102613,40.212597,-72.361859,41.512517</a>&gt;
<o:p></o:p></p>

<div>

<div>

<p class=MsoNormal><br>
<br>
or<br>
<br>
<a href="http://localhost:8888/geoserver/wfs" target="_blank">http://localhost:8888/geoserver/wfs</a><br>
<br>
&lt;wfs:GetFeature service=&quot;WFS&quot; version=&quot;1.1.0&quot;<br>
<br>
&nbsp;xmlns:topp=&quot;<a href="http://www.openplans.org/topp" target="_blank">http://www.openplans.org/topp</a>&quot;<br>
<br>
&nbsp;xmlns:wfs=&quot;<a href="http://www.opengis.net/wfs" target="_blank">http://www.opengis.net/wfs</a>&quot;<br>
<br>
&nbsp;xmlns:ogc=&quot;<a href="http://www.opengis.net/ogc" target="_blank">http://www.opengis.net/ogc</a>&quot;<br>
<br>
&nbsp;xmlns:gml=&quot;<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>&quot;<br>
<br>
&nbsp;xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance"
target="_blank">http://www.w3.org/2001/XMLSchema-instance</a>&quot;<br>
<br>
&nbsp;xsi:schemaLocation=&quot;<a href="http://www.opengis.net/wfs"
target="_blank">http://www.opengis.net/wfs</a><br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<a
href="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" target="_blank">http://schemas.opengis.net/wfs/1.1.0/wfs.xsd</a>&quot;&gt;<br>
<br>
&nbsp;&lt;wfs:Query typeName=&quot;topp:states&quot;&gt;<br>
<br>
&nbsp; &nbsp;&lt;wfs:PropertyName&gt;topp:STATE_NAME&lt;/wfs:PropertyName&gt;<br>
<br>
&nbsp; &nbsp;&lt;wfs:PropertyName&gt;topp:PERSONS&lt;/wfs:PropertyName&gt;<br>
<br>
&nbsp; &nbsp;&lt;ogc:Filter&gt;<br>
<br>
&nbsp; &nbsp; &nbsp;&lt;ogc:BBOX&gt;<br>
<br>
&nbsp; &nbsp; &nbsp;
&nbsp;&lt;ogc:PropertyName&gt;the_geom&lt;/ogc:PropertyName&gt;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;gml:Envelope srsName=&quot;<a
href="http://www.opengis.net/gml/srs/epsg.xml#4326" target="_blank">http://www.opengis.net/gml/srs/epsg.xml#4326</a>&quot;&gt;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;gml:lowerCorner&gt;-75.102613
40.212597&lt;/gml:lowerCorner&gt;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;gml:upperCorner&gt;-72.361859 41.512517&lt;/gml:upperCorner&gt;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;&lt;/gml:Envelope&gt;<br>
<br>
&nbsp; &nbsp; &nbsp;&lt;/ogc:BBOX&gt;<br>
<br>
&nbsp; &lt;/ogc:Filter&gt;<br>
<br>
&nbsp;&lt;/wfs:Query&gt;<br>
<br>
&lt;/wfs:GetFeature&gt;<br>
<br>
&nbsp;<br>
But when I use openlayers, how to request thses requests exactly?<br>
<br>
For instance, when I request GetFeatureInfo with openlayers.<br>
<br>
// support GetFeatureInfo<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.events.register('click', map,
function (e) {<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;document.getElementById('nodelist').innerHTML = &quot;Loading... please
wait...&quot;;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;var url =
&nbsp;map.layers[0].getFullRequestString(<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;REQUEST: &quot;GetFeatureInfo&quot;,<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;EXCEPTIONS: &quot;application/vnd.ogc.se_xml&quot;,<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;BBOX: map.getExtent().toBBOX(),<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;X: e.xy.x,<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;Y: e.xy.y,<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;INFO_FORMAT: 'text/html',<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;QUERY_LAYERS: map.layers[0].params.LAYERS,<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;FEATURE_COUNT: 50,<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;WIDTH: map.size.w,<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;HEIGHT: map.size.h<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;},<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&quot;<a
href="http://localhost:8888/geoserver/wms" target="_blank">http://localhost:8888/geoserver/wms</a>&quot;<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;);<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OpenLayers.loadURL(url,
'', this, setHTML, setHTML);<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp;OpenLayers.Event.stop(e);<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;});<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp;}<br>
<br>
&nbsp;<br>
&nbsp;<br>
Please, give me a piece of information.<br>
<br>
&nbsp;<br>
Best regards,<br>
<br>
Myeonghun Jeong.<br>
<br>
&nbsp;<br>
&nbsp;<o:p></o:p></p>

</div>

</div>

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

</blockquote>

</div>

</div>

</div>

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

</div>

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

</div>

</body>

</html>