Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

is it a must to use BBOX strategy with WFS protocol in Vector layers ?

I cannot display this layer without BBOX strategy:

vLayer = new OpenLayers.Layer.Vector("Test", { 

    styleMap: new OpenLayers.StyleMap({ 
        "default": style 
      maxExtent: new OpenLayers.Bounds(-180, -90, 180, 90).transform(geographic,mercator), 
      sphericalMercator: true,   
      protocol:  new OpenLayers.Protocol.WFS({   
      url: 'http://myDomain/geoserver/wfs', 
      featureType: "Layer_1",   
      featureNS: "", 
      srsName: "EPSG:3857", 
      version: "1.1.0", 
      extractAttributes: true, 
      isBaseLayer: false, 


I am not getting any request in firebug. What am I missing here ?


URL request in firebug:


XML Post:

<wfs:GetFeature xmlns:wfs="" service="WFS" version="1.1.0" xsi:schemaLocation="" xmlns:xsi="">
<wfs:Query typeName="myWorkSpace:Layer_1" srsName="EPSG:3857" xmlns:myWorkSpace=""></wfs:Query>

and sometimes the response came with error:

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.0.0"
  xsi:schemaLocation=" http://myDomain/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"
  xmlns:xsi="" xmlns:ows="">
  <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>java.lang.IllegalStateException: A transformation exception occurred while reprojecting data on the fly
A transformation exception occurred while reprojecting data on the fly
Latitude 91°00.0'N is too close to a pole.</ows:ExceptionText>
share|improve this question
Which version of Geoserver are you using btw? – R.K. Oct 7 '12 at 7:12
GeoServer version 2.1.2 – Shadin Oct 7 '12 at 7:21
In Google Chrome, there is a very very few features appear on the map. but in FireFox, nothing at all. – Shadin Oct 7 '12 at 7:30
up vote 1 down vote accepted

When using the web mercator projection you should try to limit requests to +/- 85 degrees of latitude. Because of the way the maths works out things get tricky the nearer to the poles you get and in your case you are asking for a point (91N) beyond the pole which is definitely going to be a problem.

You can use a BBOX strategy and set it to be something like:

new OpenLayers.Bounds(-180, -85, 180, 85).transform(geographic,mercator);

which will fetch all reasonable data.

If you have data near the poles then you should probably be using a different projection.

share|improve this answer
you mean I have to set maxExtent of vector layer to new OpenLayers.Bounds(-180, -85, 180, 85).transform(geographic,mercator); ?? I did that but still the new request is sent when map's extent changes. I want all layer features to be loaded at the beginning (just one request) – Shadin Oct 9 '12 at 6:06

You don't have to use the BBOX strategy but you have to choose a strategy. The strategy is responsible for controlling tasks such as when to load or refresh the data in the layer. The BBOX strategy that you used for example, is used to display data that is within the map's extent.

As for your error, it seems to be related to a bug in GeTools which Geoserver used. You might want to check the bounds of the projection you're using.

share|improve this answer
Thanks.. well, When I replace BBOX with Fixed strategy, I got nothing displays on the map. There is a request in firebug with right response but nothing is shown on the map. Is there something I have to do ? – Shadin Oct 7 '12 at 6:16
Can you post a pastebin of the Firebug request response in ? – R.K. Oct 7 '12 at 6:27
just edited my post. Many Thanks. – Shadin Oct 7 '12 at 6:45
Got it. Why do you want to remove the BBOX strategy btw? – R.K. Oct 7 '12 at 6:48
I want to load all layer features once at the beginning, not read new features when the viewport changes. – Shadin Oct 7 '12 at 6:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.