Hi,
I have a wfs vector layer which has to be styled with 6 classes based on
integer
values.
0-25;
26-50;
51-75;
76-100;
101-200;
200+
When I click on the features it should also have a select style (red border
line)
I really haven“t got a clue where to start. I have a sld which I made for the
wms version, but how can I get a wfs vector layer to use this sld and how do I
attatch a select style?
<code>
var style_solar = new OpenLayers.StyleMap({
"default": new
OpenLayers.Style(OpenLayers.Util.applyDefaults({
fillOpacity: 0.6,
fillColor: '#000000'
}, OpenLayers.Feature.Vector.style["default"])),
"select": new
OpenLayers.Style(OpenLayers.Util.applyDefaults({
fillOpacity: 0.6,
fillColor: '#FF0000'
}, OpenLayers.Feature.Vector.style["select"]))
});
var layer_solar = new OpenLayers.Layer.Vector("Solarenergie", {
styleMap: style_solar,
projection: "EPSG:4326",
strategies: [new OpenLayers.Strategy.Fixed()],
protocol: new OpenLayers.Protocol.WFS({
url: "http://maps.zgb.de:8080/geoserver/wfs?",
version: "1.1.0",
featureType: "SG_gen_solarkopf_wgs84",
featureNS: "http://www.zgb.de/postgis",
srsName: "EPSG:4326"
}),
eventListeners: {
featuresadded: function(){
var extent_solar = layer_solar.getDataExtent()
mapPanel_solar.map.zoomToExtent(extent_solar);
}
}
});
</code>
Thanks for any pointers.
Yours,
Robert
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users