[OpenLayers-Users] Mapping website visitors with OpenLayers?

Alexandre Leroux alexandre.leroux at ec.gc.ca
Thu Feb 8 14:18:08 EST 2007


Hi Christopher,

I understand what you're telling me.

My hope was/is that in the future, OpenLayers would be able to generate 
a static image from numerous points from a text file. This would be 
similar to generating a WMS layer directly with OpenLayers. I'm not sure 
this is possible or if it should even be included in OpenLayers' long 
term objectives.

Cheers :-)

Alex


Christopher Schmidt wrote:
>> Maybe one day OpenLayers will be able to do this (e.g. mapping huge 
>> number of markers and mapping densities)? I hope so ;-)
> 
> The problem is not with OpenLayers -- that is, there is nothing specific
> that OpenLayers does which makes this slow -- but instead with browsers
> themselves.
> 
> The thing which is slow is:
>  <div id="viewport" style="top:0px; left:0px;">
>    <div>Content</div> 
>    <div>Content</div> 
>    ... repeat 500 or more times 
>    <div>Content</div> 
>  </div>
> 
> Then, in Javascript, do this:
> 
>  for(i=0; i < 50; i++) {
>    viewport.style.top=(parseInt(viewport.style.top)+1) + "px"; 
>  }
> 
> I expect that you will find it behaving at a speed that is
> non-interactive.
> 
> Now realize that OpenLayers does the equivilant of this (though it is
> slightly more complex) every time the map moves. The time that is taken
> here is not by OpenLayers, but instead by the browser -- each of those
> small moves takes a non-zero length of time.
> 
> I think you'll find this in any situation. In the Google Maps API a year
> ago, I found that anything more than 250 markers will make browsers fall
> over. We've gone significantly beyond that, but we can't change the fact
> that browsers simply can't perform in the way that we want them to --
> instantly, all the time.
> 
> So, although Moore's Law will help us as time goes on, the problem is
> not one that can be solved with more code -- instead, it is a case that
> simply needs to be accomodated for and affects the decisions of how
> something is done.
> 
> If you really can't do anything serverside, you might look into trying
> some client-side clustering, but that seems hairy, and is well beyond
> the idea of what I'd want to try :)
> 
> Good luck.
> 
> Regards,

-- 
Alexandre Leroux, M.Sc., Ing.
Environnement Canada / Environment Canada
Centre météorologique canadien / Canadian Meteorological Centre
Division de la réponse aux urgences environnementales /
Environmental Emergency Response Division
alexandre.leroux at ec.gc.ca



More information about the Users mailing list