[OpenLayers-Dev] Grid-style loading of Markers

Matt Williamson matthewdw at gmail.com
Tue Feb 9 16:45:41 EST 2010


Thanks for the feedback, and yes, these might be some possible solutions, but I think I'm kindof stuck with the need for a more complex solution.

What I've got is about 20,000 points, spread all over the Continental US. They're stored in a non-spatial enabled MySQL DB that I don't have control over (can't really add a view, or indexes) which is already under fairly heavy load. Part of the whole point of what we're doing is to allow the users to zoom/pan over the entire US, so limiting the viewport isn't an option.

We've tried things in the past that involved dynamically getting a new set of points from the server whenever the viewport changed, but this is an inefficient use of the DB (considering the point locations aren't dynamic), and wasn't consistent--e.g., when you pan, points that were there before might disappear, based on the way the query came out. This actually is a bigger annoyance than it sounds--in practice it makes the display feel really glitchy.

I've looked a bit at the clustering strategies, but if I understand correctly the entire dataset (at least in the Z direction) has to be sent to the client for those to be useful. Sending the entire set of 20k points wouldn't be efficient.

I've also tried things like additively sending points when panning/zooming, but that still leaves a mess when zooming out from a dense area. By the way, while the point locations are static, the data is not--in fact I'm planning to have several varieties of relatively complex symbology displayed for the icons, which is why readability (meaning, getting rid of dense clusters of points) when zoomed out is important.

To further complicate things, we have weighted importance for the points (some points are more important than others, and therefore should be favored for display when zoomed out), so determining the points to display for any given viewport is a non-trivial operation.

Well, if all this hasn't bored you to death, at least maybe you can see why I'm leaning towards a solution like the one I'm attempting. Though I am open to other solutions.


On Feb 9, 2010, at 1:52 PM, Evan James Bowling wrote:

>  What do you think about just limiting which points get loaded? This would still need a bit of a server component but it wouldn't be anything as big as Geoserver.
>  There are also ways to cluster a large set of data points such that only a manageable amount would be displayed. I have messed with this functionality much myself, but I intend to give it a shot soon.
> Unless you are willing to restrict the zoom interface to only a few levels it seems like generating that amount of tiles would be more work than its worth ( just my opinion).
> Hope some of this helps.
> Evan Bowling
> On Tue, Feb 9, 2010 at 2:38 PM, Matt Williamson <MatthewDW at gmail.com> wrote:
> Devs,
> I posted this to the Users list, but the devs list might have made more sense, since part of the question has to do with the vector behaviors sandbox in SVN...
> I am looking for a way to load statically stored "tiles" full of marker information, so I can do progressive disclosure of a large point dataset (and I don't have access to Geoserver or similar server-side component). My maps are spherical mercator/Google based, so loading the markers in tiles makes sense.
> I found this post on the dev list, which sounds pretty much exactly like what I want to do...
> http://openlayers.org/pipermail/dev/2009-January/004222.html
> But it was using stuff from the vector behaviors sandbox, which hasn't been touched in a year, it looks like.
> So my question is: Is there a standard way to do something like this? From static tile files on the server filesystem (probably GeoJSON format)? I know the "right" answer is to set up a WFS server somewhere, but that's out of the question in the short term. Plus, my point locations change very seldom, so Geoserver would really be overkill anyway.
> I was going to try writing my own OpenLayers.Layer.Grid and OpenLayers.Tile subclasses, but I wanted to check if there's an existing way to do this that I've missed, or if the OpenLayers.Strategy.Grid stuff in the vector behaviors sandbox stuff is still a valid way to go.
> Thanks!
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20100209/a0468d64/attachment.html

More information about the Dev mailing list