<div class="gmail_quote"><br>Hi all, <br><br>I was searching in the list something about my problem. I can not reproject my wfs layer over my OpenStreetMaps layer with spherical mercator. I use this code:<br><br>function initMap(){<br>
<br>&nbsp;&nbsp;&nbsp; format = &#39;image/png&#39;;<br>
<br>&nbsp;&nbsp;&nbsp; if (initBounds == null) initBounds = new OpenLayers.Bounds(-18785164.068, -11740727.3725,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 18785164.068, 11740727.7125);<br><br>&nbsp;&nbsp;&nbsp; var bounds = new OpenLayers.Bounds(-20037508, -20037508,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 20037508, 20037508.34);<br>

<br>&nbsp;&nbsp;&nbsp; var proj4326 = new OpenLayers.Projection(&quot;EPSG:4326&quot;);<br>&nbsp;&nbsp;&nbsp; var proj900913 = new OpenLayers.Projection(&quot;EPSG:900913&quot;);<br>&nbsp;&nbsp;&nbsp; //initBounds.transform(proj4326, proj900913);<br><br>&nbsp;&nbsp;&nbsp; var options = {<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; controls: [],<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxExtent: bounds,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; maxResolution: 39135.758475,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; numZoomLevels: 19,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; projection: proj900913,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; displayProjection: proj4326,<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; units: &#39;m&#39;<br>&nbsp;&nbsp;&nbsp; };<br><br>&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map(&#39;map&#39;,options);&nbsp;&nbsp;&nbsp; <br><br>&nbsp;&nbsp;&nbsp; //carga las capas de Google en caso de que se vayan a utilizar<br>&nbsp;&nbsp;&nbsp; /*var gmap = new OpenLayers.Layer.Google(<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;Google Streets&quot;, {&#39;sphericalMercator&#39;: true}<br>&nbsp;&nbsp;&nbsp; );<br><br>&nbsp;&nbsp;&nbsp; var gsat = new OpenLayers.Layer.Google(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;Google Satellite&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {type: G_SATELLITE_MAP, &#39;sphericalMercator&#39;: true, numZoomLevels: 18}<br>

&nbsp;&nbsp;&nbsp; );*/<br><br>&nbsp;&nbsp;&nbsp; //carga la capa base de OSM<br>&nbsp;&nbsp;&nbsp; var OSMLayer = new OpenLayers.Layer.OSM.Osmarender(&quot;Osmarender&quot;);<br><br>&nbsp;&nbsp;&nbsp; var MapnikLayer = new OpenLayers.Layer.OSM.Mapnik(&quot;Mapnik&quot;);<br><br>
&nbsp;&nbsp;&nbsp; // carga capas wms<br>
&nbsp;&nbsp;&nbsp; var Instancias&nbsp; = new OpenLayers.Layer.WMS(<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;Instancias&quot;, &quot;<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers: &#39;osmius:usuarios_instancias&#39;,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; srs: &#39;EPSG:4326&#39;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; format: format,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; transparent : &#39;true&#39;//,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; },<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {singleTile: true, ratio: 1} <br>&nbsp;&nbsp;&nbsp; );<br>&nbsp;&nbsp;&nbsp; var Servicios = new OpenLayers.Layer.WMS(<br>

&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;Servicios&quot;, &quot;<a href="http://localhost:8080/geoserver/wms" target="_blank">http://localhost:8080/geoserver/wms</a>&quot;,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; layers: &#39;osmius:usuarios_servicios&#39;,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; srs: &#39;EPSG:4326&#39;,<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; format: format,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; transparent : &#39;true&#39;//,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; },<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {singleTile: true, ratio: 1} <br>&nbsp;&nbsp;&nbsp; );<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; var WFSlayer = new OpenLayers.Layer.WFS( &quot;Instancias WFS&quot;,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;<a href="http://localhost:8080/geoserver/wfs" target="_blank">http://localhost:8080/geoserver/wfs</a>&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; { typename: &#39;osmius:usuarios_instancias&#39;}, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; typename: &#39;usuarios_instancias&#39;,<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;<span style="color: rgb(255, 0, 0);"> projection: map.displayProjection</span><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; );<br><br>&nbsp;&nbsp;&nbsp; <br>You can see that I use the projection parameter in the wfs layer, but the features are not reprojected, I don&#39;t understand because.<br>

<br>This is my capabilities:<br><br>&lt;FeatureType&gt;<br>&lt;Name&gt;osmius:usuarios_instancias&lt;/Name&gt;<br>&lt;Title&gt;osm_vw_instance_pnt_Type&lt;/Title&gt;<br>&lt;Abstract&gt;Generated from osmius&lt;/Abstract&gt;<br>
&minus;<br>
&lt;ows:Keywords&gt;<br>&lt;ows:Keyword&gt;osm_vw_instance_pnt&lt;/ows:Keyword&gt;<br>&lt;ows:Keyword&gt;osmius&lt;/ows:Keyword&gt;<br>&lt;/ows:Keywords&gt;<br>&lt;DefaultSRS&gt;urn:x-ogc:def:crs:EPSG:4326&lt;/DefaultSRS&gt;<br>

&minus;<br>&lt;ows:WGS84BoundingBox&gt;<br>&lt;ows:LowerCorner&gt;-9.648588334999998 40.30276938&lt;/ows:LowerCorner&gt;<br>&lt;ows:UpperCorner&gt;0.4904789049999987 50.44183662&lt;/ows:UpperCorner&gt;<br>&lt;/ows:WGS84BoundingBox&gt;<br>

&lt;/FeatureType&gt;<br>&minus;<br>&lt;FeatureType&gt;<br>&lt;Name&gt;osmius:usuarios_servicios&lt;/Name&gt;<br>&lt;Title&gt;osm_vw_service_pnt_Type&lt;/Title&gt;<br>&lt;Abstract&gt;Generated from osmius&lt;/Abstract&gt;<br>&minus;<br>

&lt;ows:Keywords&gt;<br>&lt;ows:Keyword&gt;osmius&lt;/ows:Keyword&gt;<br>&lt;ows:Keyword&gt;osm_vw_service_pnt&lt;/ows:Keyword&gt;<br>&lt;/ows:Keywords&gt;<br>&lt;DefaultSRS&gt;urn:x-ogc:def:crs:EPSG:4326&lt;/DefaultSRS&gt;<br>

&minus;<br>&lt;ows:WGS84BoundingBox&gt;<br>&lt;ows:LowerCorner&gt;-3.813766 40.382172&lt;/ows:LowerCorner&gt;<br>&lt;ows:UpperCorner&gt;-3.613766 40.582172&lt;/ows:UpperCorner&gt;<br>&lt;/ows:WGS84BoundingBox&gt;<br>&lt;/FeatureType&gt;<br>

&lt;/FeatureTypeList&gt;<br>&minus;<br><br>Thanks to all<br><br><br>
</div><br><br clear="all"><br>-- <br># michogar<br># Analista Programador SIG<br># GNU/Linux Counter 462666<br><br>Una visión personal:<br><a href="http://michogar.blogspot.com">http://michogar.blogspot.com</a><br><br>El día a día: <br>
<a href="http://twitter.com/michogar">http://twitter.com/michogar</a><br><br><br>