Charles,
This is starting to become a bit clearer now, thanks...
(1) malformed layer: after setting the log levels, then shutting down
tomcat, shifting the logs, and re-starting tomcat...voila! the layer
simply displays in preview...nothing else has been changed.
(http://74.50.62.108:8080/geoserver/gn/wms?service=WMS&version=1.1.0&request=GetMap&layers=gn:ro310_socio-econ-agf_pc&styles=&bbox=122.025,-21.83,145.512,-10.569&width=688&height=330&srs=EPSG:4326&format=application/openlayers)
Is this a 'typical' scenario? When in doubt just reboot Tomcat??
(2) How to manage a viewing client. Right: the only "client" I know
about is what can be constructed using the little assembly environment
provided by GeoExplorer (composer). This suits our needs fine in most
respects: we have slightly customised the view window GeoExplorer (to
show layers and legends in dedicated, scrollable panels) but otherwise
are happy with what it provides. GeoExplorer is a simple layer picker
reading the local GeoServer offerings, which is why we have to have
individual, selectable layers in GeoServer so that we can grab them from
GeoExplorer. I know that sounds like a lot of hassle just to use a GUI,
but the alternative (start assembling javascript by hand?) is totally
impractical at this point.
Your configuration method below looks absolutely like what we need to be
using though...but I've got no idea where to start with this! Aside from
tipping headfirst into raw opnelayers.js and geoext...what can I do? I
love GeoExplorer composer for the simple reason that it does 98% of what
we needs...it's this "select/style individual attribute layers from the
one source layer" issue that is the *only* missing piece of the puzzle
for us.
Kind regards,
JB
John Brisbin
Managing Director, BoaB interactive Pty Ltd
POB 802 Townsville, QLD 4810
M: 0407 471 565 | P: 07 3103 0574
Skype: boabjohn | Twitter: @boabjohn
On 6/10/2011 1:23 AM, Charles Galpin wrote:
On Oct 5, 2011, at 10:11 AM, John Brisbin wrote:
I'm not sure how to "expose" all the attributes? Following my
original scenario, I added a new resource, which allowed me to select
the one shapefile table from the PostGIS store. At what point am I
able to expose all the attributes? Do you mean (under the [Publishing
tab]) to move all the relevant styles over to the [Selected styles]
pane? If this works how I think it works, then what we get delivered
to the user is a *single layer* that can be selected in the map
viewer. If the user is cluey, they can right click, choose to Edit
Style, and then browse a drop-down list of the 30 different styles.
That's interesting, and certainly saves data storage space, but how
can the user see 2 layers at once? And how do we display the
human-friendly layer title in the layer panel? I think these are the
key deliverables I have to provide...and the "edit style" strategy
seems to go a different conceptual path?
Unless you use a sql view, all layers are exposed automatically.
Sorry, I probably just confused things by saying that, but I was just
trying to point out that you publishing the layer 30 times achieves
nothing on the geoserver side other than having a named layer that has
a different default style bound to it. You can test this by moving
the relevant styles to the selected styles list and the layer preview
(when working) will let you switch between them. It's just less work
and easier to manage than the way you are doing it.
What client are you using? I can see how what you are doing will work
for something that asks geoserver for the published layers (so you get
entries for each), but if you are writing your own client with
openlayers for example, you just add a new layer for each style you
want, and that way the user can enable or disable them individually.
var turtles = new OpenLayers.Layer.WMS(
"Turtle layer", "/geoserver/wms",
{
layers: 'yourns:yourlayer',
styles: 'turtleStyle',
...
},
{
…
}
);
var fish = new OpenLayers.Layer.WMS(
"Fish layer", "/geoserver/wms",
{
layers: 'yourns:yourlayer',
styles: 'fishStyle',
...
},
{
…
}
);
map.addLayers([gmap, turtles, fish]);
Let us know what the increased logging reveals.
charles
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users