[OpenLayers-Users] Using a vector style with polygon breaks map
Robert Buckley
robertdbuckley at yahoo.com
Wed Apr 6 15:36:06 EDT 2011
Hi,
In my app I have a polygon vector layer which won´t take on a simple style.
If I leave the styleMap config in the mappanel empty the default style is
applied without a problem.
This is the only polygon vector layer in the app and the other point styles work
fine.
http://maps.zgb.de:8080/geoserver/www/testing/wea.html
In the solarenergie tab when the style is activated the whole map is broken.
Code for the simple style:
var style_solar = OpenLayers.Util.extend({},
OpenLayers.Feature.Vector.style['default']);
style_solar.fillOpacity = 0.2;
style_solar.graphicOpacity = 1;
Layer code:
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);
}
}
});
cheers,
Rob
can anyone point me in the right direction?
yours,
Robert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110406/19e7cf74/attachment.html
More information about the Users
mailing list