Hi, do you have proj4js.js included in your html page? See http://trac.openlayers.org/wiki/Documentation/Dev/proj4js
OpenLayers out of the box can only transform between EPSG:4326 and EPSG:900913. Regards, Andreas. On 11/10/09, Pedro Baracho <[email protected]> wrote: > Thanks for the reply. > > I changed to 1.1.0, but I am still having problems with projections. > > The BBOX filter of the request is being built with weird numbers on it: > > <ogc:BBOX><ogc:PropertyName>GEOLOC</ogc:PropertyName><gml:Envelope > xmlns:gml="http://www.opengis.net/gml" > srsName="EPSG:29193"><gml:lowerCorner>-4987936.2379319 > -2307634.0730985</gml:lowerCorner><gml:upperCorner>-4797149.4153663 > -2213769.4023813</gml:upperCorner></gml:Envelope></ogc:BBOX> > > Those numbers don't make any sense in EPSG:29193 ( > http://spatialreference.org/ref/epsg/29193/) > The bounds should be limited to: 166020.2387, 7087605.5418, 833979.7613, > 10000000.0000, and I am seeing some negative numbers. > > I also changed the displayProjection on the map to EPSG:29193 and those > weird numbers are confirmed by OpenLayers.Control.MousePosition. > > My guess is that there is some problem with the reprojection routine from > 900913 to 29193. I am also guessing this may be because 29193 is limited to > a region of the globe while 900913 is a world-wide projection. Does it make > sense? I don't know much about cartography and projections and I didn't dig > in OpenLayers code yet. > > Do you have any other hint for me? > > On Mon, Nov 9, 2009 at 6:40 PM, Andreas Hocevar <[email protected]>wrote: > >> Hi, >> >> WFS 1.0.0 does not support on-the-fly reprojection. You have to use WFS >> 1.1.0, which is e.g. supported by GeoServer. And you have to specify the >> version on the protocol: >> >> Pedro Baracho wrote: >> > var layer = new OpenLayers.Layer.Vector("WFS", { >> > strategies: [new OpenLayers.Strategy.BBOX(), >> > saveStrategy], >> > protocol: new OpenLayers.Protocol.WFS({ >> version: "1.1.0", >> > url: "http://localhost:8080/geoserver/wfs", >> > featureType: "Regional", >> > featureNS: "http://prodabel1062.pbh:8080/avis", >> > geometryName: "GEOLOC", >> > srsName: "EPSG:29193" >> > }), >> > projection: new OpenLayers.Projection("EPSG:29193") >> > }); >> > >> >> >> Regards, >> Andreas. >> >> -- >> Andreas Hocevar >> OpenGeo - http://opengeo.org/ >> Expert service straight from the developers. >> >> > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
