<!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.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=093300522-06012010>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=093300522-06012010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=093300522-06012010>for own sld test purpose I have set up an 
example</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><A 
href="http://gis.ibbeck.de/OLClient/examples/wms_sld_world.asp">http://gis.ibbeck.de/OLClient/examples/wms_sld_world.asp</A></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff 
size=2></FONT> </DIV>
<DIV dir=ltr align=left><SPAN class=093300522-06012010><FONT face=Arial 
color=#0000ff size=2>which use SLD to render filtered items of a 
map.</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=093300522-06012010></SPAN><FONT face=Arial><FONT 
color=#0000ff><FONT size=2>A<SPAN 
class=093300522-06012010>rnd</SPAN></FONT></FONT></FONT><BR></DIV>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> users-bounces@openlayers.org 
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von 
</B>Steve.Toutant@inspq.qc.ca<BR><B>Gesendet:</B> Mittwoch, 6. Januar 2010 
17:10<BR><B>An:</B> Andreas Hocevar<BR><B>Cc:</B> users@openlayers.org; 
users-bounces@openlayers.org<BR><B>Betreff:</B> Re: [OpenLayers-Users] geojson - 
Performance issue<BR></FONT><BR></DIV>
<DIV></DIV><BR><FONT face=sans-serif size=2>Thanks for this alternative 
Andreas.</FONT> <BR><BR><FONT face=sans-serif size=2>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 face=sans-serif size=2>It never 
ends...Always something new to learn</FONT> <BR><BR><FONT face=sans-serif 
size=2>Thanks</FONT> <BR><FONT face=sans-serif size=2>Steve</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 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 
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>Andreas Hocevar 
      <ahocevar@opengeo.org>@openlayers.org</B> </FONT><BR><FONT 
      face=sans-serif size=1>Envoyé par : users-bounces@openlayers.org</FONT> 
      <P><FONT face=sans-serif size=1>06/01/2010 10:35 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>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] geojson - 
            Performance issue</FONT></TR></TBODY></TABLE><BR>
      <TABLE>
        <TBODY>
        <TR vAlign=top>
          <TD>
          <TD></TR></TBODY></TABLE><BR></TR></TBODY></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></P></BODY></HTML>