Hi again, <br><br>I&#39;ve seen that no attachment can be sent to the list. So I&#39;ve put the code at the end of this mail...<br><br><br>-----------------<br>I&#39;ve have a problem of misplacement of features and popup when adding a vector layer to a OL map with a background Google.<br>
<br>I
just want ot add some points entered in WGS84 (by
OpenLayers.Layer.Vector) to a map with a Google layer as the base
layer. I&#39;ve put my map in spherical Mercator, as well as the google
layer and I&#39;ve transformed my points in EPSG:900913 but I still have a
problem!<br>
<br>My points are displayed near the exact location, but with a slight
shift. When I zoom/zoom over or if I pan in the N-S direction, points
are changing of position. Until here, it seems that it is just a
projection problem, but I think I&#39;m doing right in the projection
setup(?)<br>
<br>But the most surprising is that the popup, which should be
displayed on the points when clicking on it, are displayed at the exact
locations, at any scale! So the position of the popup are right!<br><br>If I try to transfom the points from EPSG4326 to EPSG900913, they are not displayed anymore anywhere...<br>
<br>I&#39;ve attached my stand-alone working code.<br><br><br>This identically happen under WinXP-IE7 or FF and Ubuntu-FF.<br><br>Any hints are welcome!<br><br>Julien<br><br>----------------------------<br> &lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>&quot;&gt; <br>
  &lt;head&gt; <br>    &lt;link rel=&quot;stylesheet&quot; href=&quot;<a href="http://openlayers.org/dev/theme/default/style.css">http://openlayers.org/dev/theme/default/style.css</a>&quot; type=&quot;text/css&quot; /&gt;  <br>
    &lt;link rel=&quot;stylesheet&quot; href=&quot;<a href="http://openlayers.org/dev/examples/style.css">http://openlayers.org/dev/examples/style.css</a>&quot; type=&quot;text/css&quot; /&gt; <br>    &lt;title&gt;Wallonie with GoogleMaps&lt;/title&gt; <br>
    &lt;script src=&#39;<a href="http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABQIAAAACxUxJ46tcIiZKWG81HlNYBQNmDPi4Y89dW251X5Bl4Z1--Eg2BTkAwr63SeUaRI4wI8RwX7LgtHN0g">http://maps.google.com/maps?file=api&amp;amp;v=2&amp;amp;key=ABQIAAAACxUxJ46tcIiZKWG81HlNYBQNmDPi4Y89dW251X5Bl4Z1--Eg2BTkAwr63SeUaRI4wI8RwX7LgtHN0g</a>&#39;&gt;&lt;/script&gt; <br>
    &lt;script src=&quot;<a href="http://openlayers.org/api/OpenLayers.js">http://openlayers.org/api/OpenLayers.js</a>&quot;&gt;&lt;/script&gt;  <br>    &lt;script type=&quot;text/javascript&quot;&gt; <br>    var map, gbase, points, selectControl, selectedFeature;<br>
    var proj = new OpenLayers.Projection(&quot;EPSG:4326&quot;);<br>     var bounds = new OpenLayers.Bounds(6.190,50.517,6.205,50.535);<br>    bounds.transform(proj, map.getProjectionObject());<br><br>    var options = { <br>
        projection: new OpenLayers.Projection(&quot;EPSG:900913&quot;),<br>        displayProjection: new OpenLayers.Projection(&quot;EPSG:4326&quot;),<br>        units: &quot;m&quot;,<br>        numZoomLevels: 18,<br>        maxResolution: 156543.0339,<br>
        maxExtent: new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34) <br>        };<br><br>    function onPopupClose(evt) {<br>            selectControl.unselect(selectedFeature);<br>        }<br>        function onFeatureSelect(feature) {<br>
            selectedFeature = feature;<br>            popup = new OpenLayers.Popup.FramedCloud(&quot;chicken&quot;, <br>                                     feature.geometry.getBounds().getCenterLonLat(),<br>                                     null,<br>
                      &quot;&lt;div&quot; + <a href="http://feature.id">feature.id</a> +&quot;&gt;&lt;/div&gt;&quot;,<br>                                     null, true, onPopupClose);<br>              popup.setBackgroundColor(&quot;red&quot;);<br>
        popup.setBorder(&quot;10px&quot;);<br>          feature.popup = popup;<br>            map.addPopup(popup);<br>        }<br><br>        function onFeatureUnselect(feature) {<br>            map.removePopup(feature.popup);<br>
            feature.popup.destroy();<br>            feature.popup = null;<br>        }   <br> <br>    function init() { <br>            map = new OpenLayers.Map(&#39;map&#39;,options); <br>         // Add google layers <br>
         gbase = new OpenLayers.Layer.Google( &quot;Google Physical&quot;, {type: G_PHYSICAL_MAP}, {&#39;sphericalMercator&#39;: true} ); <br><br>        map.addLayer(gbase);<br><br>        // Add Bornes Frontières Geometry<br>
        var Bornes = new Array();<br>        <br>        Bornes[0] = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(6.20475,50.52167));<br>        Bornes[1] = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(6.20440,50.52148));        <br>
        //Bornes[0] = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(6.20475,50.52167).transform(new OpenLayers.Projection(&quot;EPSG:4326&quot;),new OpenLayers.Projection(&quot;EPSG:900913&quot;)));<br>        //Bornes[1] = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(6.20440,50.52148).transform(new OpenLayers.Projection(&quot;EPSG:4326&quot;),new OpenLayers.Projection(&quot;EPSG:900913&quot;)));<br>
<br>            points = new OpenLayers.Layer.Vector(&quot;Infos&quot;, {projection: new OpenLayers.Projection(&quot;EPSG:4326&quot;)});<br>        points.addFeatures(Bornes);<br>        <br>        map.addLayer(points);<br>
 <br>        // Ajout des Controls <br>        map.addControl(new OpenLayers.Control.LayerSwitcher()); <br>        map.addControl(new OpenLayers.Control.ScaleLine({div:document.getElementById(&quot;scale&quot;)})); <br>        map.addControl(new OpenLayers.Control.MousePosition({div:document.getElementById(&quot;mouseposition&quot;)})); <br>
<br>            selectControl = new OpenLayers.Control.SelectFeature(points,{onSelect: onFeatureSelect, onUnselect: onFeatureUnselect});<br>            map.addControl(selectControl);<br>        selectControl.activate();<br>
 <br>           map.zoomToExtent(bounds);<br>     }       <br> <br>    &lt;/script&gt; <br>  &lt;/head&gt; <br>    &lt;body onload=&quot;init()&quot;&gt; <br>      &lt;h4 id=&quot;title&quot;&gt;Wallonie with GoogleMaps&lt;/h4&gt; <br>
      &lt;div&gt; Carte dynamique OpenLayers&lt;/div&gt; <br>      &lt;div style=&quot;width:100%; height:80%&quot; id=&quot;map&quot;&gt;&lt;/div&gt; <br>      &lt;div align=&quot;right&quot; id=&quot;mouseposition&quot;&gt;&lt;/div&gt; <br>
      &lt;div align=&quot;right&quot; id=&quot;scale&quot;&gt; &lt;/div&gt; <br>  &lt;/body&gt; <br>&lt;/html&gt;<br>