<br><font size=2 face="sans-serif">Thanks for this alternative Andreas.</font>
<br>
<br><font size=2 face="sans-serif">I don't know much about sld but I read
some threads and it seems to be the right solution. I'll try to find some
goog examples.</font>
<br><font size=2 face="sans-serif">It never ends...Always something new
to learn</font>
<br>
<br><font size=2 face="sans-serif">Thanks</font>
<br><font size=2 face="sans-serif">Steve</font>
<br><font size=2 face="sans-serif"><br>
</font><font size=3 color=#0066ff><i>Steve Toutant, M. Sc.</i></font><font size=3><br>
Analyste en géomatique<br>
Secteur environnement<br>
Direction de la santé environnementale et de la toxicologie<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 size=3 color=blue><u><br>
</u></font><a href=mailto:steve.toutant@inspq.qc.ca><font size=3 color=blue><u>steve.toutant@inspq.qc.ca</u></font></a><font size=3 color=blue><u><br>
</u></font><a href=http://www.inspq.qc.ca/><font size=3 color=blue><u>http://www.inspq.qc.ca</u></font></a>
<p><font size=3> </font>
<p>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Andreas Hocevar <ahocevar@opengeo.org>@openlayers.org</b>
</font>
<br><font size=1 face="sans-serif">Envoyé par : users-bounces@openlayers.org</font>
<p><font size=1 face="sans-serif">06/01/2010 10:35 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">A</font></div>
<td><font size=1 face="sans-serif">users@openlayers.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Objet</font></div>
<td><font size=1 face="sans-serif">Re: [OpenLayers-Users] geojson - Performance
issue</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br>
<br>
<br><tt><font size=2>Hi,<br>
<br>
2000+ features is way too much for rendering in the browser.<br>
<br>
if you use mapserver already, then you can also query the layer as WMS<br>
layer, using sld_body with a filter. If your query is complex, use<br>
Layer.WMS.Post instead of Layer.WMS to avoid urls that are too long for
IE.<br>
<br>
Regards,<br>
Andreas.<br>
<br>
On 2010-01-06 16:29, Steve.Toutant@inspq.qc.ca wrote:<br>
><br>
> Hi,<br>
> I created a WMS (mapserver) layer containing 13400 polygons. It loads<br>
> in less then 3 seconds. Good.<br>
><br>
> I need to develop a tool for the user so he can create a custom query<br>
> on this layer to retreive specific polygons. In a form, the user<br>
> select the parameters and launch the request. Here is the code below.<br>
> That works, but it takes minutes to render. Per example, a query that<br>
> returns 2482 polygons, In firebug I see that the query runs in less<br>
> then 2 seconds.<br>
> But, It seems that the creation of the geometries is an heavy task.
I<br>
> get this warning in FF<br>
><br>
><br>
> I click on Continue several times and then I get geometries in the
map.<br>
><br>
> I guess 2482 polygons is simply too much for a vector layer. If that<br>
> is the case, is there another format then GeoJson I could use? Maybe<br>
> my approach is totally wrong...<br>
><br>
> Any comments would be appreciated.<br>
> Thanks for your help,<br>
> Steve<br>
><br>
> The code used:<br>
><br>
> Ext.Ajax.request({<br>
> url: 'requeteVulnerabilite.php',<br>
> method:'POST',<br>
> params: { inddef: cb_inddefValue},<br>
> failure: function(){alert("Ca pas marché");},<br>
> success: function(result, request )<br>
> {<br>
> //alert(result.responseText);<br>
> vulnerabiliteLayer.destroyFeatures();<br>
> var features
= new<br>
> OpenLayers.Format.GeoJSON({'internalProjection':map.baseLayer.projection,'externalProjection':map.baseLayer.projection<br>
><br>
>
<br>
>
}).read(result.responseText);<br>
> var bounds;<br>
> if(features)<br>
> {<br>
>
if(features.constructor != Array) {<br>
>
features = [features];<br>
>
}<br>
>
for(var i=0; i<features.length; ++i) {<br>
>
if (!bounds) {<br>
>
bounds
=<br>
> features[i].geometry.getBounds();<br>
>
} else {<br>
>
<br>
> bounds.extend(features[i].geometry.getBounds());<br>
>
}<br>
>
}<br>
>
vulnerabiliteLayer.addFeatures(features);<br>
>
map.zoomToExtent(bounds);<br>
> }<br>
> <br>
> }<br>
> });<br>
><br>
><br>
><br>
><br>
> /Steve Toutant, M. Sc./<br>
> Analyste en géomatique<br>
> Secteur environnement<br>
> Direction de la santé environnementale et de la toxicologie<br>
> Institut national de santé publique du Québec<br>
> 945, avenue Wolfe<br>
> Québec, Qc G1V 5B3<br>
><br>
> Tél.: (418) 650-5115 #5281<br>
> Fax.: (418) 654-3144_<br>
> __steve.toutant@inspq.qc.ca_ <mailto:steve.toutant@inspq.qc.ca>_<br>
> __http://www.inspq.qc.ca_ <http://www.inspq.qc.ca/><br>
><br>
> <br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> Users@openlayers.org<br>
> http://openlayers.org/mailman/listinfo/users<br>
> <br>
<br>
<br>
-- <br>
Andreas Hocevar<br>
OpenGeo - http://opengeo.org/<br>
Expert service straight from the developers.<br>
<br>
_______________________________________________<br>
Users mailing list<br>
Users@openlayers.org<br>
http://openlayers.org/mailman/listinfo/users<br>
</font></tt>
<br>
<br>
<br>