[OpenLayers-Users] BBOX strategy loading all features
Rohan Parkes
melanchthon76 at gmail.com
Sun Aug 14 18:59:02 EDT 2011
I had this problem, and fixed it by manually setting the layer maxExtent to
the same as the map maxExtent. I dont know why this was necessary, as I
would have expected that value to bubble up from the map into the layer.
Rohan Parkes
From: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] On Behalf Of Robert
Buckley
Sent: Thursday, 11 August 2011 10:27 PM
To: users at openlayers.org
Subject: [OpenLayers-Users] BBOX strategy loading all features
Hi,
I´m obviously missing something basic here...my BBOX strategy is still
loading all the features.
var BBOXStrategy = new OpenLayers.Strategy.BBOX();
var highlight_style = new OpenLayers.StyleMap({
"default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
title: "WEA",
graphicName: "circle",
fillColor: "#56E3FF",
strokeColor: "#3A3F3B",
strokeWidth: 0.5,
fillOpacity: 1,
pointRadius: 7
}, OpenLayers.Feature.Vector.style["default"])),
"select": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
title: "WEA",
graphicName: "circle",
fillColor: "#FF0000",
strokeColor: "#3A3F3B",
strokeWidth: 2,
fillOpacity: 1,
pointRadius: 9
}, OpenLayers.Feature.Vector.style["select"]))
});
var layer_wea = new OpenLayers.Layer.Vector('Windkraftanlagen', {
strategies: [BBOXStrategy],
protocol: new OpenLayers.Protocol.WFS({
url: "http://maps.zgb.de/geoserver/wfs?",
version: "1.1.0",
featureType: "wea_wgs84",
featureNS: "http://www.zgb.de/postgis",
srsName: "EPSG:900913"
}),
styleMap: highlight_style,
visibility: false
});
map.addLayer(layer_wea);
have I forgotten something?
yours,
Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110815/7d3b17a2/attachment.html
More information about the Users
mailing list