Hi Andreas,
<br><br>Yes, adding this code in a simple page with a fixed size map div worked fine, no displacement. I will experiment more with the mapfish setup, and bring this up on the mapfish list if I can't figure it out.
<br><br>Thanks for your help
<br><br>Jo
<br>----- Original Message -----
<br>From: &quot;Andreas Hocevar (via Nabble)&quot; &lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2723878&i=0" target="_top" rel="nofollow">ml-user+67559-1830404419@...</a>&gt;
<br>To: &quot;Jo Cook&quot; &lt;<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=2723878&i=1" target="_top" rel="nofollow">j.cook@...</a>&gt;
<br>Sent: Friday, 24 April, 2009 21:35:30 GMT +00:00 GMT Britain, Ireland, Portugal
<br>Subject: Re: [OpenLayers-Users] displacement of google satellite data compared to google streetmap
<br><br>Jo Cook wrote: 
<br>&gt; Hi Andreas, 
<br>&gt; 
<br>&gt; I've tried your new patch for bug 1797 but it doesn't do anything for me. I 
<br>&gt; don't know if it's because I'm not seeing this problem when I resize the 
<br>&gt; map, but when I simply switch layers. I'm not using a vector layer over the 
<br>&gt; top, just a WMS (non baselayer), so I haven't seen the issues with popup 
<br>&gt; alignment. 
<br>&gt; 
<br><br>So it seems your issue is a different one. Maybe you have some weird css 
<br>on the page where you place the map? Try to use the code you posted 
<br>below in an empty html page without css and just a map div. 
<br><br>Other than that, does the workaround to specify the map div's width and 
<br>height in pixels work for you? 
<br><br>Regards, 
<br>Andreas. 
<br><br><div class='shrinkable-quote'><br>&gt; Andreas Hocevar-2 wrote: 
<br>&gt; 
<br>&gt;&gt; Hi, 
<br>&gt;&gt; 
<br>&gt;&gt; this is a known issue, unfortunately without a good solution at the 
<br>&gt;&gt; moment: 
<br>&gt;&gt; <a href="http://trac.openlayers.org/ticket/1797" target="_top" rel="nofollow">http://trac.openlayers.org/ticket/1797</a>&nbsp;
<br>&gt;&gt; <a href="http://trac.openlayers.org/ticket/2055" target="_top" rel="nofollow">http://trac.openlayers.org/ticket/2055</a>&nbsp;
<br>&gt;&gt; 
<br>&gt;&gt; A workaround is to specify the map div's width and height in pixels. 
<br>&gt;&gt; 
<br>&gt;&gt; Regards, 
<br>&gt;&gt; Andreas. 
<br>&gt;&gt; 
<br>&gt;&gt; Joanne Cook wrote: 
<br>&gt;&gt; 
<br>&gt;&gt;&gt; Hi List, 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; I have a map that I thought was all correctly set up to use spherical 
<br>&gt;&gt;&gt; mercator, and all my data (which is all projected in 900913) is correctly 
<br>&gt;&gt;&gt; displaying on either open streetmap or google streets data. However, when 
<br>&gt;&gt;&gt; I add a google satellite or hybrid layer, the initial load of the map 
<br>&gt;&gt;&gt; shows the satellite layer displaced several hundred miles to the west. If 
<br>&gt;&gt;&gt; I switch to the google streets layer without any zooming or panning, the 
<br>&gt;&gt;&gt; displacement disappears. If I then switch back to the google satellite 
<br>&gt;&gt;&gt; layer, again with no zooming or panning, it appears in the correct place. 
<br>&gt;&gt;&gt; Throughout all of this, my data layer has no displacement. Furthermore, 
<br>&gt;&gt;&gt; since all of this is set within mapfish, with extjs used for side panels, 
<br>&gt;&gt;&gt; if I minimise the side panel while the displacement is occurring it also 
<br>&gt;&gt;&gt; removes the displacement. I'm using the svn versions of openlayers and 
<br>&gt;&gt;&gt; mapfish. 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; This is the code relating to setting up the map and layers: 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; function createMap() { 
<br>&gt;&gt;&gt; var options = { 
<br>&gt;&gt;&gt; projection: new OpenLayers.Projection(&quot;EPSG:900913&quot;), 
<br>&gt;&gt;&gt; displayProjection: new OpenLayers.Projection(&quot;EPSG:27700&quot;), 
<br>&gt;&gt;&gt; units: &quot;m&quot;, 
<br>&gt;&gt;&gt; maxResolution: 156543.0339, 
<br>&gt;&gt;&gt; maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 
<br>&gt;&gt;&gt; 20037508.34, 
<br>&gt;&gt;&gt; 20037508.34) 
<br>&gt;&gt;&gt; }; 
<br>&gt;&gt;&gt; return new OpenLayers.Map('olmap',options); 
<br>&gt;&gt;&gt; } //end createmap 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; function addlayers(map){ 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; // define wms 
<br>&gt;&gt;&gt; layer = new OpenLayers.Layer.WMS(&quot;OA Sites WMS&quot;, 
<br>&gt;&gt;&gt; &quot; <a href="http://geoserver.thehumanjourney.net:80/geoserver/wms" target="_top" rel="nofollow">http://geoserver.thehumanjourney.net:80/geoserver/wms</a>&nbsp;?&quot;, 
<br>&gt;&gt;&gt; {layers: 'oadigi:oasites', transparent: true, 
<br>&gt;&gt;&gt; format: 'image/png', buffer:0}, 
<br>&gt;&gt;&gt; {isBaseLayer: false}); 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; // create Google Mercator layers 
<br>&gt;&gt;&gt; var gmap = new OpenLayers.Layer.Google( 
<br>&gt;&gt;&gt; &quot;Google Streets&quot;, 
<br>&gt;&gt;&gt; {'sphericalMercator': true} 
<br>&gt;&gt;&gt; ); 
<br>&gt;&gt;&gt; var gsat = new OpenLayers.Layer.Google( 
<br>&gt;&gt;&gt; &quot;Google Satellite&quot;, 
<br>&gt;&gt;&gt; {type: G_SATELLITE_MAP, 'sphericalMercator': true, 
<br>&gt;&gt;&gt; numZoomLevels: 22} 
<br>&gt;&gt;&gt; ); 
<br>&gt;&gt;&gt; var ghyb = new OpenLayers.Layer.Google( 
<br>&gt;&gt;&gt; &quot;Google Hybrid&quot;, 
<br>&gt;&gt;&gt; {type: G_HYBRID_MAP, 'sphericalMercator': true} 
<br>&gt;&gt;&gt; ); 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; // define pseudo-layer for highlighting selected features 
<br>&gt;&gt;&gt; select = new OpenLayers.Layer.Vector(&quot;Selection&quot;, 
<br>&gt;&gt;&gt; {protocol: new mapfish.Protocol.TriggerEventDecorator(protocol), 
<br>&gt;&gt;&gt; strategies: [new mapfish.Strategy.ProtocolListener({append: true})], 
<br>&gt;&gt;&gt; styleMap: new 
<br>&gt;&gt;&gt; OpenLayers.Style(OpenLayers.Feature.Vector.style[&quot;select&quot;]), 
<br>&gt;&gt;&gt; displayInLayerSwitcher: false}); 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; // add layers 
<br>&gt;&gt;&gt; map.addLayers([layer, select, gmap, gsat, ghyb]); 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; } //end addlayers 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; function setMapCenter() { 
<br>&gt;&gt;&gt; //define a new projection object so map can be centred using latlong 
<br>&gt;&gt;&gt; var proj = new OpenLayers.Projection(&quot;EPSG:4326&quot;); 
<br>&gt;&gt;&gt; var point = new OpenLayers.LonLat(-2.9, 53.6); 
<br>&gt;&gt;&gt; this.setCenter(point.transform(proj, this.getProjectionObject()), 6); 
<br>&gt;&gt;&gt; } //end setMapCenter 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; I hope that's enough information for someone as it's hard for me to get 
<br>&gt;&gt;&gt; this map accessible to the outside world yet. 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; Many thanks 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; Jo 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; 
<br>&gt;&gt;&gt; 
<br>&gt;&gt; -- 
<br>&gt;&gt; Andreas Hocevar 
<br>&gt;&gt; OpenGeo - <a href="http://opengeo.org/" target="_top" rel="nofollow">http://opengeo.org/</a>&nbsp;
<br>&gt;&gt; Expert service straight from the developers. 
<br>&gt;&gt; 
<br>&gt;&gt; _______________________________________________ 
<br>&gt;&gt; Users mailing list 
<br>&gt;&gt; Users@... 
<br>&gt;&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_top" rel="nofollow">http://openlayers.org/mailman/listinfo/users</a>&nbsp;
<br>&gt;&gt; 
<br>&gt;&gt; 
<br>&gt;&gt; 
<br>&gt; 
<br>&gt; 
</div>_______________________________________________ 
<br>Users mailing list 
<br>Users@... 
<br><a href="http://openlayers.org/mailman/listinfo/users" target="_top" rel="nofollow">http://openlayers.org/mailman/listinfo/users</a>&nbsp;
<br><br><br><br><br>This email is a reply to your post @ <a href="http://n2.nabble.com/displacement-of-google-satellite-data-compared-to-google-streetmap-tp2682471p2698857.html" target="_top" rel="nofollow">http://n2.nabble.com/displacement-of-google-satellite-data-compared-to-google-streetmap-tp2682471p2698857.html</a>&nbsp;
<br>You can reply by email or by visting the link above. 
<br><br>-- 
<br>-----------------------------------------------------
<br>Joanne Cook
<br>Senior IT Support and Development
<br>Oxford Archaeology (North)
<br>01524 880212
<br><a href="http://thehumanjourney.net" target="_top" rel="nofollow">http://thehumanjourney.net</a><br><br><br>------
<br>Files attached to this email may be in ISO 26300 format (OASIS Open Document Format). If you have difficulty opening them, please visit <a href="http://iso26300.info" target="_top" rel="nofollow">http://iso26300.info</a>&nbsp;for more information.
<br><br>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/displacement-of-google-satellite-data-compared-to-google-streetmap-tp2682471p2723878.html">Re: [OpenLayers-Users] displacement of google satellite data compared to google streetmap</a><br>
Sent from the <a href="http://n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>