[OpenLayers-Users] spherical Mercator and google overlay

Andrea Maschio andrea.maschio at gmail.com
Sun Feb 3 08:52:42 EST 2008


Hi, when building a Layer, there isn't a BBOX parameter in the options  
available. When I build a new WFS layer over a Google layer, I noticed  
that the http request string has a BBOX in srs 900913, which is  
correct because in geoserver my feature is in this srs.

But, the problem is, geoserver seems not to manage properly the  
bouding box. I mean that if I pass manually the coordinates in the  
4326 bounding box (BBOX=139,35,139.1,35.1) my feature is displayed  
correctly.

I forgot to mention that this problem happens only when the  
sphericalMercator is set to 'true'. So, summing: i have google that  
overlays my layer in srs 4326. But unfortunately it has some little  
differences caused by the fact that google map isn't projected.

When I import my feature in geoserver (who has been created in  
geoserver with srid=900913) i can see that GS tries to build a  
bounding box of 0.00012 and so which i noticed is 135 translated to  
900913. Anyway the http request created by openlayers is

..wfs?typename=topp 
%3Akanagawa&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG 
%3A900913 
&BBOX=15525210.003777895,4214737.6144324215,15544777.883015398,42343

  which should be for proper visualization of the layer,

.wfs?typename=topp 
%3Akanagawa&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&SRS=EPSG 
%3A900913&BBOX=139,35,139.1,35.1

I am not ashamed to say that I don't know very well projection and  
srid related issues, so if any could eventually link me to the point  
for understanding what I am doing wrong, it would be a lot helpful.

Thanks

--
Andrea Maschio
http://www.superandrew.it









More information about the Users mailing list