Ivan Petrushev
Ivan Petrushev

Reputation: 217

OpenLayers - best way to display a lots of data?

I have a slippy map over which I want to display a overlay with some highways. I have a PHP script that is getting filtered data from my local Overpass API server, send that data to OpenLayers and then visualise it in a Vector layer with a basic styling (red, yellow or green line color, based on the smoothness tag of the highway). It works, but it doesn't scale well when there is a lot of data to be displayed. I'm talking for about 2600 ways composed of 83000 nodes. The SVG render is struggling even on comparatively new computers.

I don't need any fancy interactive features, the goal is just to display that data.

I'm thinking of a way to render transparent tiles with these ways and then just load these tiles as overlay in OpenLayers (maybe with TMS layer?). Maybe Mapnik is going to be useful here?

What will be the best way to display such a load?

Upvotes: 1

Views: 489

Answers (1)

Ivan Petrushev
Ivan Petrushev

Reputation: 217

It seems using overlay of pre-rendered tiles is the best variant.

Positive: it is easy to implement in Openlayers; it works on slow PCs; once you setup the rendering machine all the work is done

Negative: setting up Mapnik can be huge pain; requires a bit of harddisk space to storage rendered tiles

Upvotes: 1

Related Questions