[OpenLayers-Users] Newbie question - displaying layer of text objects on a map

Andrew Smith laconical at gmail.com
Wed Mar 25 04:20:23 EDT 2009


Andreas,

On Mon, Mar 23, 2009 at 5:45 AM, Andreas Hocevar <ahocevar at opengeo.org>wrote:

> Hi,
>
> 2009/3/22 Andrew Smith <laconical at gmail.com>:
> > Andreas, you mentioned that if my data was in PostGIS I could use either
> a
> > WMS or WFS to get the data.  If I went down the WMS path, I would have
> one
> > WMS for my base map layer, and another one for my text objects layer.  My
>
> You could also combine these into one set of image tiles. WMS has a
> layers parameter. So if your wms layer params has something like
>
> params.layers=["mybaselayer","myoverlay"];
>
> in it, both will be rendered in one image, with the overlay not
> occluding the base layer.


This would be a good idea if the text data I wanted to show was static, but
unfortunately it'll be changing every 5 seconds or so. If I integrated the
base map and the text into one set of image tiles, the browser would need to
reload all image tiles regularly to get the updated data. If the text
objects are on their own layer, then the server will be doing less work to
regenerate just the text images (parsing less data from PostGIS), and
hopefully the refresh will be reasonably smooth because the base layer isn't
changing. That's what I'm hoping anyway.  I assume there are no performance
implications I need to worry about if I'm redrawing a layer every 5
seconds?  My guess is that OpenLayers is not typically used to show data
that changes so quickly.


>
>
> > understanding is that the text WMS would return a tile map of images
> which
> > would be largely empty space with the occasional text value here and
> there.
> > I guess this layer would be transparent so as not to occlude the
> underlying
> > map images.
>
> That's correct, you would have to add the transparent=true param for
> the overlay.
>
> > Meanwhile, the WFS would return the details about the text
> > labels and rely on OpenLayers to actually render the vector
> representations.
>
> You can also get the details of text labels using a WMS GetFeatureInfo
> request.


>
> > You mentioned that WMS would be preferred if there were a 'huge number of
> > features' - I'm surprised that creating all those image tiles on the
> server
> > side is faster than adding x vector objects on the browser side (I will
> > probably have a few dozen at most). Is there a certain point where it
> just
> > makes more sense to do it on the server based on the number of objects
> you
> > want to displa
>
> If you expect the number of your point to grow beyond ~100, you'll
> definitely be better off using WMS (especially if your users are on
> Internet Explorer).
>

I assume this is because SVG is not used when rendering vector objects in
IE, so there's a lot more overhead in showing vectors in that browser?

Cheers,

Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090325/6b96ede0/attachment.html


More information about the Users mailing list