<span style="border-collapse:collapse;color:rgb(34, 34, 34);font-family:arial, sans-serif;font-size:13px"><div>I've posted the longer story over on the GIS StackExchange here: </div>
<div><a href="http://gis.stackexchange.com/q/8981/2780" style="color:rgb(53, 66, 88)" target="_blank">http://gis.stackexchange.com/q/8981/2780</a></div><div><br></div><div>So I'll just try to sum up here:</div><div>
I'm trying to transition from a Mapstraction/Google Maps based system to using OpenLayers with Google Maps v3 base layers (though I'm also having the same problem using OSM as a base layer).</div><div><br></div><div>
As far as I can tell, it's only the image layers that are giving me problems; the vector based layers seem to line up correctly when compared to the old system.</div><div><br></div><div>I have 2 image layers where I'm setting the same bounds as I was using on the old system, but both of them appear to be shifted north.</div>
<div><br></div><div>Example #1: text image <a href="http://img.skitch.com/20110427-jj62ac75y8eihms3gxxfr15371.jpg" style="color:rgb(53, 66, 88)" target="_blank">http://img.skitch.com/20110427-jj62ac75y8eihms3gxxfr15371.jpg</a></div>
<div><br></div><div>Example #2: weather radar <a href="http://img.skitch.com/20110426-dxwtj44q4g9su5e58p9gc85x2s.jpg" style="color:rgb(53, 66, 88)" target="_blank">http://img.skitch.com/20110426-dxwtj44q4g9su5e58p9gc85x2s.jpg</a></div>
<div><br></div><div>I only really care about the weather radar lining up, but whatever I've done wrong, I've done wrong on both apparently.</div><div><span style="font-family:monospace;white-space:pre-wrap;font-size:medium"><br>
</span></div><div><span style="font-family:monospace;white-space:pre-wrap;font-size:medium">proj4326 = new OpenLayers.Projection("EPSG:4326");</span></div><div><pre style="white-space:pre-wrap;word-wrap:break-word;font-family:Times;font-size:medium">
<span style="font-family:Times;white-space:normal"><pre style="white-space:pre-wrap;word-wrap:break-word"># TEXT IMAGE OVERLAY</pre><pre style="white-space:pre-wrap;word-wrap:break-word">bounds = new OpenLayers.Bounds();
bounds.extend(new OpenLayers.LonLat(-115, 30));
bounds.extend(new OpenLayers.LonLat(-80, 50));
bounds.transform(proj4326, mapObject.getProjectionObject());
no_thunderstorms = new OpenLayers.Layer.Image('no thunderstorms text', '/no_thunderstorms.png', bounds, new OpenLayers.Size(450, 200), {
'isBaseLayer': false,
'alwaysinrange': true,
'visibility': false
});</pre><pre style="white-space:pre-wrap;word-wrap:break-word"># WEATHER RADAR OVERLAY</pre><pre style="white-space:pre-wrap;word-wrap:break-word"># (I also was previously using OpenLayers.LonLat instead of OpenLayers.Geometry.Point to see if it made a difference and it didn't)</pre>
<pre style="white-space:pre-wrap;word-wrap:break-word"><span style="font-family:Times;white-space:normal"><pre style="white-space:pre-wrap;word-wrap:break-word">bounds = new OpenLayers.Bounds();
bounds.extend(new OpenLayers.Geometry.Point(-127.620375523875420, 21.652538062803));
bounds.extend(new OpenLayers.Geometry.Point(-66.517937876818, 50.406626367301044));
bounds.transform(proj4326, mapObject.getProjectionObject());
window.bounds = bounds;
radar_overlay = new OpenLayers.Layer.Image('radar', '<a href="http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gif" style="color:rgb(53, 66, 88)" target="_blank">http://radar.weather.gov/ridge/Conus/RadarImg/latest_radaronly.gif</a>', bounds, new OpenLayers.Size(3400, 1600), {
'isBaseLayer': false,
'alwaysInRange': true
});</pre></span></pre></span></pre><div style="font-family:Times;font-size:medium"><span style="font-family:arial;font-size:small">Live example of the weather radar being shifted north: <a href="http://jsfiddle.net/hayley/C4rue/" style="color:rgb(53, 66, 88)" target="_blank">http://jsfiddle.net/hayley/C4rue/</a> (compare to radar overlay on <a href="http://wickedwx.com/" style="color:rgb(53, 66, 88)" target="_blank">http://wickedwx.com</a> ).</span></div>
</div><div><div><br></div><div>So far, the related issues/solutions I've seen seem to be centered around setting options that appear to not be applicable to gmaps v3 since "projection, maxExtent, units or maxResolution" are not required per <a href="http://openlayers.org/blog/2010/07/10/google-maps-v3-for-openlayers/" style="color:rgb(53, 66, 88)" target="_blank">http://openlayers.org/blog/2010/07/10/google-maps-v3-for-openlayers/</a> though correct me if I'm wrong there.</div>
<div><br></div></div><div>Any help would be greatly appreciated!</div><div><br></div><div>Hayley</div><div><br></div></span>