bartvde@anonymised.com ha scritto:
Hi Andrea,
I've created a JIRA issue:
http://jira.codehaus.org/browse/GEOS-3121
Wrt to your proposal to only allow a registered style, I would be really
against such a thing. Dynamic selections done by a client application,
which is a really useful feature in a web GIS, would become impossible.
Just like the memory consumption toggles, it would be an option, whether
it's going to be enabled or not, it's up to the administrator.
If you're making an application that is not using client dynamic styles
(and the GeoServer instance is dedicated) by raising that flag you'd
give attackers one less weapon to bring the server down (there are other
ways to make the server die with a SLD other than making it draw the
whole world, such as making it load a ridiculously big external graphic).
What check do you mean that the client can use? I assume that since the
scales are set in an SLD, and different SLD's can have different scales
set, that Geoserver WMS does not advertize ScaleHints in its
GetCapabilities response? That would be the only way for a client to know
the layer is scale dependent, and maybe the client could then insert these
values into the SLD created. But still you will always have less
intelligent clients who won't use this approach.
No, there would not be any way. But if you want to make a user friendly
client you have to tell the user "cannot do selection at the current
scale" somehow. Not sure there is any way to publish custom per layer information in the WMS capabilities, so a custom protocol would
have to be established to pass around that information.
Anyways, I agree that a zoom level control at the layer definition level
would put everyone on the same playing field, smart client and attacker
alike: no way to get anything drawn past a certain zoom level.
Let me eloborate a bit on the problem use case: the map is zoomed to
1:25.000 and the layer is visible. The user performs a selection using
SLD. The selection is visible. Then the user zooms out to 1:100.000 and
the layer disappears, but the SLD selection layer is still processed and
drawn. So I don't think the user will wonder why his selection did not get
processed, he/she will wonder why it did get processed instead 
I was considering the case in which the user makes the selection directly at 1:100.000. If the client is smart enough to disallow the
selection action at that zoom level it should be possible to make it
change the map definition and hide the selection layer when the zoom
level is inadequate to show it.
Cheers
Andrea
--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.