OK, I think I start to understad.<br><br>I modify my code like this (with spherical mercatro proyection in googlelayer, were I think it&#39;s ok)<br>And change the code of EPSG code for my layer.<br>Now my code it&#39;s:<br>
<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;script type=&quot;text/javascript&quot;&gt;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // make map available for easy debugging<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var map;<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // avoid pink tiles<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OpenLayers.Util.onImageLoadErrorColor = &quot;transparent&quot;;<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function init(){<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var options = {numZoomLevels: 20,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; projection: new OpenLayers.Projection(&quot;EPSG:900913&quot;),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; displayProjection: new OpenLayers.Projection(&quot;EPSG:4326&quot;)};<br>&nbsp;&nbsp;&nbsp;&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; // Create a map Object<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map = new OpenLayers.Map(&#39;map&#39;, options);<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Create Google Mercator layers<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var gmap = new OpenLayers.Layer.Google(&quot;Google Streets&quot;,{type: G_NORMAL_MAP,&quot;sphericalMercator&quot;: true});<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var gsat = new OpenLayers.Layer.Google(&quot;Google Satellite&quot;,{type: G_SATELLITE_MAP,&quot;sphericalMercator&quot;: true});<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var ghyb = new OpenLayers.Layer.Google(&quot;Google Hybrid&quot;,{type: G_HYBRID_MAP,&quot;sphericalMercator&quot;: true});<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var gphy = new OpenLayers.Layer.Google(&quot;Google Physical&quot;,{type: G_PHYSICAL_MAP,&quot;sphericalMercator&quot;: true});&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp; Create a WFS Sites Layer<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var sites = new OpenLayers.Layer.WFS( &quot;Sites&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;<a href="http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map">http://10.192.160.133/cgi-bin/mapserv.exe?map=/ms4w/apps/Test/WFS_Test.map</a>&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {typename: &quot;Sites&quot;,maxfeatures: 100 },{<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; featureClass: OpenLayers.Feature.WFS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayer(new OpenLayers.Layer.GML(&quot;GML&quot;,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &quot;<a href="http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml">http://10.192.160.133/OpenLayers/ngo9_wgs84_01meu_cables_lille32.gml</a>&quot;,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {format: OpenLayers.Format.GML,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; formatOptions: {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; extractStyles: true, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; extractAttributes: true},<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; projection: new OpenLayers.Projection(&quot;EPSG:4326&quot;)}<br>
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&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; );<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addLayers([gmap,gsat,ghyb,gphy,sites]);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.LayerSwitcher());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.ScaleLine);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; map.addControl(new OpenLayers.Control.MousePosition());<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!map.getCenter()) {map.zoomToMaxExtent()}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; function changezoom(x,y,z)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; map.setCenter(new OpenLayers.LonLat(x, y), z);<br>
&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; function showAddress(address) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var geocoder = new GClientGeocoder();<br>&nbsp;&nbsp;&nbsp;&nbsp; if (geocoder) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; geocoder.getLatLng(<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; address,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; function(point) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!point) {alert(address + &quot; not found&quot;);}<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else {map.setCenter(new OpenLayers.LonLat(point.x,point.y),15);}});}}<br><br><br><br>And I have new problems :S! <br>1 the scale or units in my gml and wfs layers are wrong. (normaly my points an lines must be in france, and i show it in the midle of atlantic ocean, in a very small zoom (google don&#39;t have images for this area :S)<br>
I try to define units: &quot;m&quot; and units:&quot;dd&quot;. But that don&#39;t works.<br><br>The answer for gml layer gives the correct lat lon wgs84 coordinates for lines, but I dont show it :S<br><br>Thanks for your patient and your help!<br>
<br><br><br><div class="gmail_quote">2008/6/26 Eric Lemoine &lt;<a href="mailto:eric.c2c@gmail.com">eric.c2c@gmail.com</a>&gt;:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">On Thu, Jun 26, 2008 at 4:48 PM, Christopher Schmidt<br>
&lt;<a href="mailto:crschmidt@metacarta.com">crschmidt@metacarta.com</a>&gt; wrote:<br>
&gt; On Thu, Jun 26, 2008 at 03:20:45PM +0200, David Martinez Morata wrote:<br>
&gt;&gt; Hy list, I start With OL &quot; dais ago :S and I don&#39;t know javascript :SS!!<br>
&gt;&gt; But I start to developing some simple application... And at the first time<br>
&gt;&gt; was easy to &nbsp;start (copy paste the code)...<br>
&gt;&gt; But now I have some problems with a gml layer, and I have the impression tha<br>
&gt;&gt; OL it&#39;s not more stable (maybe because I don&#39;t know javascript)...<br>
&gt;&gt; It&#39;s my 5 or 6 email to the list asking for a the same question. Problem<br>
&gt;&gt; with GML layer pan, they change the coordinates?!!!<br>
&gt;&gt; I start to play with projections and now the problem it&#39;s bigger.<br>
&gt;&gt; When I change the base layer... the map changes too!!!<br>
&gt;<br>
&gt; You didn&#39;t follow the instructions previously given to you in email,<br>
&gt; of moving the spherical mercator option into the correct place in your<br>
&gt; GOogle Layer init. Until you do this, you will continue to have<br>
&gt; problems.<br>
<br>
</div>The same comment applies to the options passed to the GML object<br>
constructor - the &#39;projection&#39; option must be in the same same object<br>
as the &#39;format&#39; and &#39;formatOptions&#39; options. Moreover, you certainly<br>
want to use EPSG:4326 rather than EPSG:4623!<br>
<br>
Regards,<br>
--<br>
<font color="#888888">Eric<br>
</font></blockquote></div><br>