[OpenLayers-Users] BBOX update fails when moving the map (since
update from OL 2.10 to OL 2.11)
Eric Lemoine
eric.lemoine at camptocamp.com
Thu Dec 29 12:13:58 EST 2011
On Tuesday, December 27, 2011, rscxdev <rscxdev at gmx.de> wrote:
> Hello
>
> i'm struggling a few hours now with the following problem:
>
> I use a vector layer + BBOX strategy to get features when panning/zooming
> the map:
>
>
> var prot = new OpenLayers.Protocol.HTTP({
> url: getfeat_url,
> readWithPOST: true,
> params: {
>
> ... (a few parameters for the request)
>
> },
> format: new JSON({
> 'internalProjection': new
OpenLayers.Projection("EPSG:900913"),
> 'externalProjection': new
OpenLayers.Projection("EPSG:4326")
> })
>
> });
>
> var feat_layer = new OpenLayers.Layer.Vector("Features", {
> strategies: [new OL_BBOX({resFactor: 1.1})],
> protocol: prot,
> styleMap: styleMap
>
> });
>
> var osm_layer = new OpenLayers.Layer.OSM.Mapnik("Mapnik");
> map.addLayers([osm_layer, feat_layer]);
>
> (standard code which you can find in examples)
>
> I used this code in openlayers 2.10 and all was fine.
> Now i changed to openlayers 2.11 and all is working fine except for
features
> that aren't loaded when moving the map.
> But
> - if i set visibility of the feature layer to false, then to true, the
> features are loaded.
> - if i zoomed in/out, the features are loaded.
> Only, when i move the map, no feature is loaded (there's no HTTP request
> resp.).
>
> I read other posts concerning similar problems and therefore tried to set
> ratio (in BBOX class) to 1, to 1.4, to 1.8, but the problem remained. Also
> changing the maxfeatures parameter of the HTTP class didnt solve the
> problem.
>
> Could someone give me a hint how to solve this, please?
Hi
Any chance to view a live example demonstrating the problem?
--
Eric Lemoine
Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex
Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111229/10e19f62/attachment.html
More information about the Users
mailing list