<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.5764" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=722545216-08062009><FONT face=Arial
color=#0000ff size=2>thats too many features by a long shot.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=722545216-08062009><FONT face=Arial
color=#0000ff size=2>your browser is hanging because its trying to render way to
many geometrys.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=722545216-08062009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=722545216-08062009><FONT face=Arial
color=#0000ff size=2>Your going to have to limit your results even
further.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=722545216-08062009><FONT face=Arial
color=#0000ff size=2>combining a bbox strategy with the clustering strategy is a
good setup.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=722545216-08062009><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=722545216-08062009><FONT face=Arial
color=#0000ff size=2>personally i have my own filters i use that allow my users
to narrow down what they are looking for.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=722545216-08062009><FONT face=Arial
color=#0000ff size=2>i send those parameters along with my request and let the
wfs narrow down the results serverside.</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Steve.Toutant@inspq.qc.ca
[mailto:Steve.Toutant@inspq.qc.ca] <BR><B>Sent:</B> Monday, June 08, 2009 12:41
PM<BR><B>To:</B> Heidt, Christopher M.<BR><B>Cc:</B> Julien-Samuel Lacroix;
users@openlayers.org<BR><B>Subject:</B> RE: [OpenLayers-Users] Problem to load a
WFS<BR></FONT><BR></DIV>
<DIV></DIV><BR><FONT face=sans-serif size=2>There are 8745 records in the
database. That is why I tried to use the cluster strategy in the first place
without success because of the error pointed out by Maxime.</FONT> <BR><BR><FONT
face=sans-serif size=2>So I tried with a smaller dataset and the wfs layer and
the cluster strategy works perfectly.</FONT> <BR><FONT face=sans-serif
size=2>It's still doesn't work for the "big" dataset. So I guess there a too
many records. Even with the cluster strategy it doesn't load.</FONT>
<BR><BR><FONT face=sans-serif size=2>1- Does the cluster strategy should work
for 8745 records requested from a shapefile or postgis?</FONT> <BR><FONT
face=sans-serif size=2>2- I cannot set the visibility of this vector layer to
false. The request is sent when the page load.</FONT> <BR><BR><FONT
face=sans-serif size=2>Here is the definition of my Vector layer:</FONT>
<BR><FONT face=sans-serif size=2>var WFSstyle = new OpenLayers.Style({</FONT>
<BR><FONT face=sans-serif size=2> pointRadius:
"${radius}",</FONT> <BR><FONT face=sans-serif size=2>
fillColor: "#71FF00",</FONT> <BR><FONT face=sans-serif size=2>
fillOpacity: 0.5,</FONT> <BR><FONT face=sans-serif size=2>
strokeColor: "#000",</FONT> <BR><FONT face=sans-serif size=2>
strokeWidth: 2,</FONT> <BR><FONT face=sans-serif size=2>
strokeOpacity: 0.3</FONT> <BR><FONT face=sans-serif size=2>},
{</FONT> <BR><FONT face=sans-serif size=2> context: {</FONT>
<BR><FONT face=sans-serif size=2> radius:
function(feature) { </FONT><BR><FONT face=sans-serif size=2>
return
Math.min(feature.attributes.count,7) + 4;</FONT> <BR><FONT face=sans-serif
size=2> }</FONT> <BR><FONT face=sans-serif
size=2> }</FONT> <BR><FONT face=sans-serif size=2>});</FONT>
<BR><FONT face=sans-serif size=2> </FONT> <BR><FONT face=sans-serif
size=2>wfsStrategy = new OpenLayers.Layer.Vector("HLM WFS Strategy",</FONT>
<BR><FONT face=sans-serif size=2> {</FONT> <BR><FONT
face=sans-serif size=2> strategies: [</FONT>
<BR><FONT face=sans-serif size=2>
new OpenLayers.Strategy.Fixed(),</FONT> <BR><FONT face=sans-serif
size=2> new
OpenLayers.Strategy.Cluster()
</FONT><BR><FONT face=sans-serif size=2>
],</FONT> <BR><FONT face=sans-serif size=2>
protocol: new OpenLayers.Protocol.HTTP({</FONT> <BR><FONT face=sans-serif
size=2> url:
"http://geo.inspq.rtss.qc.ca/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante2.map",</FONT>
<BR><FONT face=sans-serif size=2>
params: {</FONT> <BR><FONT face=sans-serif size=2>
format: "WFS",</FONT>
<BR><FONT face=sans-serif size=2>
service: "WFS",</FONT> <BR><FONT face=sans-serif
size=2>
request: "GetFeature",</FONT> <BR><FONT face=sans-serif size=2>
srs:
"EPSG:900913",</FONT> <BR><FONT face=sans-serif size=2>
VERSION : "1.0.0",</FONT>
<BR><FONT face=sans-serif size=2>
typename : 'HLM_shp_wfs2'</FONT> <BR><FONT
face=sans-serif size=2>
},</FONT> <BR><FONT face=sans-serif size=2>
format: new OpenLayers.Format.GML()</FONT> <BR><FONT
face=sans-serif size=2> }),</FONT> <BR><FONT
face=sans-serif size=2> styleMap:new
OpenLayers.StyleMap({</FONT> <BR><FONT face=sans-serif size=2>
"default": WFSstyle,</FONT> <BR><FONT
face=sans-serif size=2>
"select": {</FONT> <BR><FONT face=sans-serif size=2>
fillColor: "#8aeeef",</FONT>
<BR><FONT face=sans-serif size=2>
strokeColor: "#32a8a9"</FONT> <BR><FONT
face=sans-serif size=2>
}</FONT> <BR><FONT face=sans-serif size=2>
})</FONT> <BR><FONT face=sans-serif size=2> },</FONT>
<BR><FONT face=sans-serif size=2> {</FONT> <BR><FONT
face=sans-serif size=2>
extractAttributes:true,</FONT> <BR><FONT face=sans-serif size=2>
visibility: false,</FONT>
<BR><FONT face=sans-serif size=2>
displayInLayerSwitcher: true
</FONT><BR><FONT face=sans-serif size=2>
});</FONT> <BR><FONT face=sans-serif size=2><BR></FONT><FONT
color=#0066ff size=3><I>Steve Toutant, M. Sc.</I></FONT><FONT
size=3><BR>Analyste en géomatique<BR>Secteur environnement<BR>Direction des
risques biologiques, environnementaux et occupationnels<BR>Institut national de
santé publique du Québec<BR>945, avenue Wolfe<BR>Québec, Qc G1V 5B3 </FONT>
<P><FONT size=3>Tél.: (418) 650-5115 #5281<BR>Fax.: (418) 654-3144</FONT><FONT
color=blue size=3><U><BR></U></FONT><A
href="mailto:steve.toutant@inspq.qc.ca"><FONT color=blue
size=3><U>steve.toutant@inspq.qc.ca</U></FONT></A><FONT color=blue
size=3><U><BR></U></FONT><A href="http://www.inspq.qc.ca/"><FONT color=blue
size=3><U>http://www.inspq.qc.ca</U></FONT></A>
<P><FONT size=3> </FONT>
<P><BR><BR><BR>
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD width="40%"><FONT face=sans-serif size=1><B>"Heidt, Christopher M."
<CHRISTOPHER.M.HEIDT@saic.com></B> </FONT>
<P><FONT face=sans-serif size=1>08/06/2009 11:02 AM</FONT> </P>
<TD width="59%">
<TABLE width="100%">
<TBODY>
<TR vAlign=top>
<TD>
<DIV align=right><FONT face=sans-serif size=1>A</FONT></DIV>
<TD><FONT face=sans-serif size=1><Steve.Toutant@inspq.qc.ca>,
"Julien-Samuel Lacroix" <jlacroix@mapgears.com>,
<users@openlayers.org></FONT>
<TR vAlign=top>
<TD>
<DIV align=right><FONT face=sans-serif size=1>cc</FONT></DIV>
<TD>
<TR vAlign=top>
<TD>
<DIV align=right><FONT face=sans-serif size=1>Objet</FONT></DIV>
<TD><FONT face=sans-serif size=1>RE: [OpenLayers-Users] Problem to
load a WFS</FONT></TR></TBODY></TABLE><BR>
<TABLE>
<TBODY>
<TR vAlign=top>
<TD>
<TD></TR></TBODY></TABLE><BR></TR></TBODY></TABLE><BR><BR><BR><BR><BR><FONT
face=Arial color=blue size=2>How many features are you getting?</FONT> <BR><FONT
size=3> </FONT> <BR><BR>
<HR>
<FONT face=Tahoma size=2><B>From:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>On Behalf Of
</B>Steve.Toutant@inspq.qc.ca<B><BR>Sent:</B> Monday, June 08, 2009 10:59
AM<B><BR>To:</B> Julien-Samuel Lacroix; users@openlayers.org<B><BR>Subject:</B>
Re: [OpenLayers-Users] Problem to load a WFS</FONT><FONT
size=3><BR></FONT><BR><FONT face=sans-serif size=2><BR>In the console TAB there
is a GET call to my WFS,</FONT><FONT size=3> </FONT><FONT face=sans-serif
size=2><BR>http://geo.inspq.rtss.qc.ca/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante2.map&typename=HLM_shp_wfs2&srsName=EPSG%3A900913&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG%3A900913&BBOX=-13586195.339050002,2515633.1906250007,-1219295.6609499985,12299572.809375</FONT><FONT
size=3> <BR></FONT><FONT face=sans-serif size=2><BR>I can see the Params and the
Header but the Reponse tab is empty. After several minutes I got this
message</FONT><FONT size=3> <BR><BR><BR><BR></FONT><FONT face=sans-serif
size=2><BR>Here is line #1481</FONT><FONT size=3> </FONT><FONT face=sans-serif
size=2><BR>return envelope;}},parseAttributes:function(node){var
attributes={};var childNode=node.firstChild;var
children,i,child,grandchildren,grandchild,name,value;while(childNode){if(childNode.nodeType==1){children=childNode.childNodes;for(i=0;i<children.length;++i){child=children[i];if(child.nodeType==1){grandchildren=child.childNodes;if(grandchildren.length==1){grandchild=grandchildren[0];if(grandchild.nodeType==3||grandchild.nodeType==4){name=(child.prefix)?child.nodeName.split(":")[1]:child.nodeName;value=grandchild.nodeValue.replace(this.regExes.trimSpace,"");attributes[name]=value;}}}}</FONT><FONT
size=3> <BR></FONT><FONT face=sans-serif size=2><BR>If I call the link above
directly int IE or Firefox I get the XML file.</FONT><FONT size=3> </FONT><FONT
face=sans-serif size=2><BR>Also the memory of computer jump to 3gig and I got to
kill firefox (I'm on windows)</FONT><FONT size=3> <BR></FONT><FONT
face=sans-serif size=2><BR>thanks for your help,</FONT><FONT size=3>
</FONT><FONT face=sans-serif size=2><BR>Steve</FONT><FONT size=3>
</FONT><BR><BR><BR></BODY></HTML>