[OpenLayers-Users] Best practice for many points

Christer Nordbø christer at gdm.no
Mon Jul 29 16:36:11 PDT 2013


Hi,
Is KML your only option?
I was having the same issue some time ago.
What i ended up doing was requesting the points/objects from PostGIS based on the viewport.

I would also recommend Remi's Answer if its possible for you. Now 10 features is a really small amount, but test it by increasing the amount requested.

Some tips:
- limit the viewport to only the helpfull Scales/zoom levels.
- view only the Necessary features at any given time.
- break request into chunks
- try to Thread the request/response action to avoid browser/website freeze.

Mvh
Christer Nordbø

Den 29. juli 2013 kl. 16:19 skrev "remi" <remiglobal at gmail.com<mailto:remiglobal at gmail.com>>:


Hi,

In one of our application,  we slice the request back to the server to smaller chunks. Each chunk requests 10 features.

All request, are using the html5 worker threading method. In this case it forbids the browser from hanging.

We are not using KML like u do. Moreover our method is not sofisticated but it is working just right  for us.

Hope it helps.

Remi

On 29 Jul 2013 21:35, "Claudio V." <claudio.carvalho at lemaf.ufla.br<mailto:claudio.carvalho at lemaf.ufla.br>> wrote:
Hi, just to be sure, you mean more than 1,000 points/markers (not polygons or lines)? In the only experience I had with that many points I wasn't loading the KML through OpenLayers.Layer.Vector (as in http://openlayers.org/dev/examples/kml-layer.html, for example). We had a 'upload' dialog, so that the user could choose a file from his machine. We then used the KML Parser to extract the features and then added to a layer. This way we were able to display around 20,000 markers (before things started to get slow). If what you're doing is something similar I could give you some hints.


2013/7/28 Phil Scadden <p.scadden at gns.cri.nz<mailto:p.scadden at gns.cri.nz>>

What is the best practice to plot more than 1,000 itens from a KML file?

I have tried cluster strategy, but it still takes too much time.

Any clue is welcome!
I would say best practise is dont use any vector format for more than 500 points of geometry, period. And KML can be considerably more verbose than say GML. You are up against limitations of the browser, network transfer speeds and especially the execution speed of js. Have a long look at the application and see how you move rendering to the server (WMS). If you are stuck with KML, then look at the KML module in geoserver for example.

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.

_______________________________________________
Users mailing list
Users at lists.osgeo.org<mailto:Users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/openlayers-users


_______________________________________________
Users mailing list
Users at lists.osgeo.org<mailto:Users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
Users at lists.osgeo.org<mailto:Users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130729/27aa53fd/attachment.html>


More information about the Users mailing list