<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=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@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: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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.E-mailStijl18
        {mso-style-type:personal;
        font-family:"Arial","sans-serif";
        color:windowtext;}
span.E-mailStijl20
        {mso-style-type:personal-compose;
        font-family:"Arial","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:2005235669;
        mso-list-type:hybrid;
        mso-list-template-ids:-709173420 1713786288 135462915 135462917 135462913 135462915 135462917 135462913 135462915 135462917;}
@list l0:level1
        {mso-level-start-at:0;
        mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Arial","sans-serif";
        mso-fareast-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></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-BE" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">Hi all,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">Thanks all for the valuable input. Highly apreciated!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">In our database we have a table for each object type containing all data for records of this object type (can be 200-300 attributes/fields and even
 more). For every possible layer we have a dedicated spatial table with just the needed attributes for geoserver to render each feature correctly. So these tables have uid, geometry (points and linestrings) and at most 3-4 additional attributes.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">The WMS layers do all the displaying of the features (color, symbol/shape, width,…). The WFS layers are only used to let users hover and show some
 attribute info (not included in the wfs, but a seperate rest request) , select some features (to use in another part of the application), double click the feature to manage its information) and so on. So because a layer is based on its dedicated spatial table,
 the returned WFS data is limited to a uid, geometry and a few attributes.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">Because a sewer system can be quite dense (certainly in a city), the number of visible features on a given zoom level can range from 5000 to 25000.
 In the current (production) version of the application all WFS data for these features is loaded and processed (but as mentioned before not for displaying purposes).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">After our performance testing (after the complaints/criticism) we also noticed that WFS has a huge impact on performance. And that’s also confirmed
 by some replies in this thread. So we are definitely on the right track :) We currently try to rethink and rework the application and avoid the use of WFS completely (or as much as possible). So the current (development) version of the application has only
 WMS being loaded. Together with some other little changes (e.g. layers based only on tables, not on views anymore) we managed to improve the performance drastically. So far so good!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">But most functionalities in the application depend on these WFS layer(s). But this data is now not available anymore. So our main and biggest challenge
 is to create the same (or similar) user experience without the WFS layers. For example, a user could double click on a feature and a page with its detailed information was opened. So we had a SelectFeature control which operated on the WFS layers and had a
 doubleclick callback to open this page.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">Now I have implemented a GetFeature control which displays all features on hover (or click),. But I wonder how you can create a similar user experinece
 for e.g. double click? So what’s considered the standard or most appropriate approach to achieve this kind of functionality? Do I need to have a SelectFeature control which wraps a GetFeature control? Or do better alternatives exist?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">Kind regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US">Roel<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="NL" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Van:</span></b><span lang="NL" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> Glenn Mullett [mailto:tchagra@gmail.com]
<br>
<b>Verzonden:</b> woensdag 5 november 2014 5:02<br>
<b>Aan:</b> Roel De Nijs<br>
<b>CC:</b> openlayers-users@lists.osgeo.org<br>
<b>Onderwerp:</b> Re: [OpenLayers-Users] Alternatives to get rid of WFS layers<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p>Hi Roel<o:p></o:p></p>
<p>I agree with Phil.  However, in times when you need to load many features through wfs, you can also try the following:<o:p></o:p></p>
<p>- Use geojson as the output format, not gml - this will greatly reduce the response size.<o:p></o:p></p>
<p>- Configure the webserver to gzip text content - this will also give quite a performance boost.<o:p></o:p></p>
<p>- You could pipe all requests to your backend wfs server through a php proxy (using curl to send and retrieve the content from the wfs server).  If you are going to then be making many of the same type of request through the proxy, you can enable a webserver
 side content cache such as mod_mem_cache (apache) to speed things up a little<o:p></o:p></p>
<p>- wfs 2.0 protocol supports paging by providing a recordcount variable.  You may be able to use this feature of wfs 2.0 together with an e.g. paged geoext featuregrid and only load x number of features at a time.<o:p></o:p></p>
<p>Kind regards, <br>
Glenn<o:p></o:p></p>
<div>
<p class="MsoNormal">On 5 Nov 2014 00:01, "Phil Scadden" <<a href="mailto:P.Scadden@gns.cri.nz">P.Scadden@gns.cri.nz</a>> wrote:<o:p></o:p></p>
<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"><span style="font-family:"Verdana","sans-serif"">I've posted here a number of times on WMS/WFS. My advice is never use WFS when you can do WMS instead. In particular, you use WMS for all display. I use WFS when I want attribute information
 and I get that on demand with getfeature queries, which can be onHover. If there isnt too much geometry, then I return WFS geometry and draw it to show selections etc. but for objects with dense geometry SldSelect works better. Rethink the application as WMS
 and you will get far better performance.<o:p></o:p></span></p>
<div>
<div style="border-top:solid black 1.0pt;border-left:none;border-bottom:solid black 1.0pt;border-right:none;padding:8.0pt 0cm 8.0pt 0cm;margin-top:15.0pt;margin-bottom:15.0pt">
<p class="MsoNormal"><span style="font-size:8.0pt;font-family:"Verdana","sans-serif"">Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><o:p></o:p></p>
</blockquote>
</div>
</div>
<hr color="#00ADEE" size="1" noshade="">
<br>
<font face="Arial" size="1" color="#00ADEE"><i>Volg Aquafin op <a href="https://www.facebook.com/AquafinNV" style="color:#00ADEE">
Facebook</a> | <a href="https://twitter.com/aquafinnv" style="color:#00ADEE">Twitter</a> |
<a href="http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee" style="color:#00ADEE">
YouTube</a> | <a href="http://www.linkedin.com/company/aquafin/products" style="color:#00ADEE">
LinkedIN</a> </i><br>
<br>
<font color="gray">Disclaimer: zie <a href="http://www.aquafin.be" style="color:gray">
www.aquafin.be</a></font>   <font face="Webdings" color="#00CC00" size="2">P</font>
<font color="black">Denk aan het milieu. Druk deze mail niet onnodig af.</font> </font>
</body>
</html>