[OpenLayers-Users] how to display pure text with geoserver
Ian Turton
ijturton at gmail.com
Tue Jun 22 10:50:58 EDT 2010
To start with you'll get better answers on the GeoServer lists.
On Tue, Jun 22, 2010 at 3:53 AM, Robert Buckley
<robertdbuckley at yahoo.com> wrote:
> Hi,
>
> Is there any extension or trick to rendering text in an efficient manner
> independant of geometry?
>
> I have a layered map of polygon geometries in which counties appear beneath
> towns and landuse. I need to present map text to display the county name
> over all layers but the county geometry must appear under the other layers.
>
If all your layers come from the same GeoServer then the labels will
be on top if you request all the layers at the same time.
> I don´t have much experience with geoserver, but my initial thinking would
> be to sybolize the layer geometries first, and then add the counties layer a
> second time with the polygons set to white or opacity = 1.
>
If you are serving from multiple servers then you need to create a
second style with just a textsymbolizer for your county layer. Then
make the last layer added to your map be the counties with that style.
There is a risk of the labels being over your towns etc as the
renderer doesn't know anything about them. If you set the polygons to
white you won't see anything below the layer.
> This has the result that the text poisition is determined by the polygon
> shape. How would I go about repositioning the text to more suitable
> areas....for example if the text overlaps with a symbol?
>
Ask for all the layers together and the labeler will avoid the other
symbols (by default I think, but there may be a parameter to set).
--
Ian Turton
More information about the Users
mailing list