Hey again,<br><br>thanks a lot for the help Andreas.<br><br>I didn't have proj4js loaded. I thought it came along with OL. :P<br><br>It is working great now.<br><br>I just have a minor issue that is the first load of the page.<br>
On firebug, the BBOX filter of the first request doesn't get reprojected to 29193, but from the second request on, the BBOX gets reprojected and the data is drawn.<br><br>This might have something to do with the request being sent before proj4js is completely loaded. I used the complete version with all EPSG projections on it, and it is a 70kb compressed js file.<br>
<br>I will try removing all the other projections from it and initializing only EPSG:29193 using "Proj4js.defs" and see if that solves the problem.<br><br>Do you have any suggestion regarding this?<br><br><div class="gmail_quote">
On Tue, Nov 10, 2009 at 10:37 AM, Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br>
<br>
do you have proj4js.js included in your html page? See<br>
<a href="http://trac.openlayers.org/wiki/Documentation/Dev/proj4js" target="_blank">http://trac.openlayers.org/wiki/Documentation/Dev/proj4js</a><br>
<br>
OpenLayers out of the box can only transform between EPSG:4326 and EPSG:900913.<br>
<br>
Regards,<br>
<font color="#888888">Andreas.<br>
</font><div><div></div><div class="h5"><br>
On 11/10/09, Pedro Baracho <<a href="mailto:pedropbaracho@gmail.com">pedropbaracho@gmail.com</a>> wrote:<br>
> Thanks for the reply.<br>
><br>
> I changed to 1.1.0, but I am still having problems with projections.<br>
><br>
> The BBOX filter of the request is being built with weird numbers on it:<br>
><br>
> <ogc:BBOX><ogc:PropertyName>GEOLOC</ogc:PropertyName><gml:Envelope<br>
> xmlns:gml="<a href="http://www.opengis.net/gml" target="_blank">http://www.opengis.net/gml</a>"<br>
> srsName="EPSG:29193"><gml:lowerCorner>-4987936.2379319<br>
> -2307634.0730985</gml:lowerCorner><gml:upperCorner>-4797149.4153663<br>
> -2213769.4023813</gml:upperCorner></gml:Envelope></ogc:BBOX><br>
><br>
> Those numbers don't make any sense in EPSG:29193 (<br>
> <a href="http://spatialreference.org/ref/epsg/29193/" target="_blank">http://spatialreference.org/ref/epsg/29193/</a>)<br>
> The bounds should be limited to: 166020.2387, 7087605.5418, 833979.7613,<br>
> 10000000.0000, and I am seeing some negative numbers.<br>
><br>
> I also changed the displayProjection on the map to EPSG:29193 and those<br>
> weird numbers are confirmed by OpenLayers.Control.MousePosition.<br>
><br>
> My guess is that there is some problem with the reprojection routine from<br>
> 900913 to 29193. I am also guessing this may be because 29193 is limited to<br>
> a region of the globe while 900913 is a world-wide projection. Does it make<br>
> sense? I don't know much about cartography and projections and I didn't dig<br>
> in OpenLayers code yet.<br>
><br>
> Do you have any other hint for me?<br>
><br>
> On Mon, Nov 9, 2009 at 6:40 PM, Andreas Hocevar <<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>>wrote:<br>
><br>
>> Hi,<br>
>><br>
>> WFS 1.0.0 does not support on-the-fly reprojection. You have to use WFS<br>
>> 1.1.0, which is e.g. supported by GeoServer. And you have to specify the<br>
>> version on the protocol:<br>
>><br>
>> Pedro Baracho wrote:<br>
>> > var layer = new OpenLayers.Layer.Vector("WFS", {<br>
>> > strategies: [new OpenLayers.Strategy.BBOX(),<br>
>> > saveStrategy],<br>
>> > protocol: new OpenLayers.Protocol.WFS({<br>
>> version: "1.1.0",<br>
>> > url: "<a href="http://localhost:8080/geoserver/wfs" target="_blank">http://localhost:8080/geoserver/wfs</a>",<br>
>> > featureType: "Regional",<br>
>> > featureNS: "<a href="http://prodabel1062.pbh:8080/avis" target="_blank">http://prodabel1062.pbh:8080/avis</a>",<br>
>> > geometryName: "GEOLOC",<br>
>> > srsName: "EPSG:29193"<br>
>> > }),<br>
>> > projection: new OpenLayers.Projection("EPSG:29193")<br>
>> > });<br>
>> ><br>
>><br>
>><br>
>> Regards,<br>
>> Andreas.<br>
>><br>
>> --<br>
>> Andreas Hocevar<br>
>> OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
>> Expert service straight from the developers.<br>
>><br>
>><br>
><br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Andreas Hocevar<br>
OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br>
</div></div></blockquote></div><br>