I am trying to render the KML file having 18000 line string data on OSM map using OpenLayers HTTP strategy.

To render OSM map I am using GeoExt.MapPanel and ExtJS 3.4 viewport.

The problem I am facing is the stop running script error on page and in IE8 hang the PC and browser.


18000 lines?

Why would you draw so many vectors on the Map? I'm not surprised with the performance.

While OpenLayers suggests that you don't add more than 500 markers, you can generally add a fair bit more number of vectors. But 18000 shapes is just too much for the Browser to handle.

You should generally rethink about showing this data in some other way.

| improve this answer | |
  • Thanks for reply,We need to shows the routes on maps. Do you have any other alternative for that. Please share if possible than with us. – Bhavin Patel Apr 12 '13 at 18:16
  • I would convert the KML to Shapefiles/PostGIS and then use Geoserver to create a WMS/WFS service. You'll be then able to show it as a WMS Service, and if needed at higher zoom levels, you can show the vectors using BBox Strategy and WFS protocol. – Devdatta Tengshe Apr 13 '13 at 5:17
  • Thanks Devdatta to respond quickly.I deeply appreciate you. I am thinking on to generate the GeoServer based on your suggestion but also need to highlight one point in that,we also required the update the our real time route data on every 5 minutes so will impact on the performance also. So need your thoughts in that. Because every 5 min my live data should render on map and WMS provide the live data tiles. That processing will take time. – Bhavin Patel Apr 14 '13 at 13:11
  • If you update the PostGIS Back-end, the update will be instantaneous. The next time a WMS/WFS request is made, updated data will be provided.If you want auto updates, then yes, you will have to do some work. – Devdatta Tengshe Apr 15 '13 at 3:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.