[OpenLayers-Users] geojson - Performance issue

Arnd Wippermann arnd.wippermann at web.de
Wed Jan 6 17:10:19 EST 2010


Hi,
 
for own sld test purpose I have set up an example
http://gis.ibbeck.de/OLClient/examples/wms_sld_world.asp
 
which use SLD to render filtered items of a map.
 
Arnd

  _____  

Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Steve.Toutant at inspq.qc.ca
Gesendet: Mittwoch, 6. Januar 2010 17:10
An: Andreas Hocevar
Cc: users at openlayers.org; users-bounces at openlayers.org
Betreff: Re: [OpenLayers-Users] geojson - Performance issue



Thanks for this alternative Andreas. 

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. 
It never ends...Always something new to learn 

Thanks 
Steve 

Steve Toutant, M. Sc.
Analyste en géomatique
Secteur environnement
Direction de la santé environnementale et de la toxicologie
Institut national de santé publique du Québec
945, avenue Wolfe
Québec, Qc G1V 5B3 

Tél.: (418) 650-5115 #5281
Fax.: (418) 654-3144
 <mailto:steve.toutant at inspq.qc.ca> steve.toutant at inspq.qc.ca
 <http://www.inspq.qc.ca/> http://www.inspq.qc.ca 


  







Andreas Hocevar <ahocevar at opengeo.org>@openlayers.org 
Envoyé par : users-bounces at openlayers.org 


06/01/2010 10:35 AM 


A
users at openlayers.org 

cc

Objet
Re: [OpenLayers-Users] geojson - Performance issue

	






Hi,

2000+ features is way too much for rendering in the browser.

if you use mapserver already, then you can also query the layer as WMS
layer, using sld_body with a filter. If your query is complex, use
Layer.WMS.Post instead of Layer.WMS to avoid urls that are too long for IE.

Regards,
Andreas.

On 2010-01-06 16:29, Steve.Toutant at inspq.qc.ca wrote:
>
> Hi,
> I created a WMS (mapserver) layer containing 13400 polygons. It loads
> in less then 3 seconds. Good.
>
> I need to develop a tool for the user so he can create a custom query
> on this layer to retreive specific polygons. In a form, the user
> select the parameters and launch the request. Here is the code below.
> That works, but it takes minutes to render. Per example, a query that
> returns 2482 polygons, In firebug I see that the query runs in less
> then 2 seconds.
> But, It seems that the creation of the geometries is an heavy task. I
> get this warning in FF
>
>
> I click on Continue several times and then I get geometries in the map.
>
> I guess 2482 polygons is simply too much for a vector layer. If that
> is the case, is there another format then GeoJson I could use? Maybe
> my approach is totally wrong...
>
> Any comments would be appreciated.
> Thanks for your help,
> Steve
>
> The code used:
>
> Ext.Ajax.request({
> url: 'requeteVulnerabilite.php',
> method:'POST',
> params: { inddef: cb_inddefValue},
> failure: function(){alert("Ca pas marché");},
> success: function(result, request )
>         {
>                 //alert(result.responseText);
>                 vulnerabiliteLayer.destroyFeatures();
>                 var features = new
>
OpenLayers.Format.GeoJSON({'internalProjection':map.baseLayer.projection,'ex
ternalProjection':map.baseLayer.projection
>
>                                                                      
>                                    }).read(result.responseText);
>                 var bounds;
>                 if(features)
>                 {
>                         if(features.constructor != Array) {
>                                 features = [features];
>                         }
>                         for(var i=0; i<features.length; ++i) {
>                                 if (!bounds) {
>                                         bounds =
> features[i].geometry.getBounds();
>                                 } else {
>                                        
> bounds.extend(features[i].geometry.getBounds());
>                                 }
>                         }
>                         vulnerabiliteLayer.addFeatures(features);
>                         map.zoomToExtent(bounds);
>                 }
>        
>         }
> });
>
>
>
>
> /Steve Toutant, M. Sc./
> Analyste en géomatique
> Secteur environnement
> Direction de la santé environnementale et de la toxicologie
> Institut national de santé publique du Québec
> 945, avenue Wolfe
> Québec, Qc G1V 5B3
>
> Tél.: (418) 650-5115 #5281
> Fax.: (418) 654-3144_
> __steve.toutant at inspq.qc.ca_ <mailto:steve.toutant at inspq.qc.ca>_
> __http://www.inspq.qc.ca_ <http://www.inspq.qc.ca/>
>
>  
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users





-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100106/b7838a09/attachment.html


More information about the Users mailing list