If layer2 is meant to hide information which the user is not authorized to
see, then yes, it will be fairly simple for one who is competent with the WMS
protocol and a browsers console to bypass this mechanism, and only request
layer1.
You will need to embed the polygons from layer2 in the rendering of layer1.
Regards,
/julian
Fra: Ian Turton [mailto:ijtur...@gmail.com]
Sendt: 1. august 2017 14:52
Til: Watermeyer, Andreas <andreas.waterme...@its-digital.de>
Cc: GeoServer Mailing List List <geoserver-users@lists.sourceforge.net>
Emne: Re: [Geoserver-users] Styling: How to draw geometries on top of labels
You can't do this in a single image, GeoServer puts a lot of effort into saving
up the labels and doing conflict resolution etc to make them look nice. This
has to happen last in the drawing process.
To achieve this you can request two maps one for layer1 and another for layer2
(with transparency turned on) and then draw one above the other. However this
will prevent label conflict resolution so you may well end up with labels on
top of each other.
I don't understand what you mean about authorization? it has no bearing on
label drawing.
Ian
On 1 August 2017 at 13:37, Watermeyer, Andreas
<andreas.waterme...@its-digital.de<mailto:andreas.waterme...@its-digital.de>>
wrote:
Hi all,
we have a layer "layer1" rendered by a css style, consisting of geometries and
labels. Under certain circumstances another layer "layer2" shall be displayed
on top of it (containing circular poylgons), hiding the geometries and labels
"layer2" below.
We are currently accomplishing this through a WMS request like
"...&LAYERS=layer1,layer2".
This is not working because the labels are always rendered on top, instead of
being hidden.
I have not yet tried to define a layer group but I suppose it will be the same.
Furthermore the currenty approach is simpler, so if possible, we would like to
stay without a group.
I have also tried to tweak the z-index of the labels and geometries, but again
this has no effect, by intention I suppose.
Does anybody know how to hide labels by geometries?
Or alternative approaches?
Any help is welcome!
PS: This is actually meant to be some sort of authorization, although this is
apparently easy to circumvent.
Best regards,
Andreas
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users
--
Ian Turton
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users