<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Hello, I need help regarding image layers.</div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; ">Here's my problem. I have two base layers which is a google map with EPSG:900913 projection and a shapefile with EPSG:4326 projection. Now on top of the base map I have an image overlay in png format. With the default basemap loaded first which is the shapefile, the map loads properly, but when I switch the baselayer into google, the image layer does not display. Switching back to the shapefile base layer, the image layer is visible again. Here's how my code goes:</div><div style="font-family: 'times new
 roman', 'new york', times, serif; font-size: 12pt; "><br></div><div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><span style="font-size: 12pt; "> mapPanel.map.events.register('changebaselayer', mapPanel.map, function(e){</span><br></div><div><span class="Apple-tab-span" style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; white-space: pre; ">        </span><span style="font-family: 'times new roman', 'new york', times, serif;">if(mapPanel.map.baseLayer.name=="shapefile")</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><span class="Apple-tab-span" style="white-space:pre">  </span>{</span></div><div><span class="Apple-tab-span" style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; white-space: pre; ">         </span><span style="font-family: 'times new roman', 'new york', times, serif;">mapPanel.map.layers[1].extent = new
 OpenLayers.Bounds(116, 4, 128, 22);</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><span class="Apple-tab-span" style="white-space:pre">         </span>//or this should be </span><span style="font-family: 'times new roman', 'new york', times, serif; ">mapPanel.map.layers[1].moveTo(new OpenLayers.Bounds(116, 4, 128, 21.61).transform(geographic, mercator), true, true);?</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><span class="Apple-tab-span" style="white-space:pre">   </span>}</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><span class="Apple-tab-span" style="white-space:pre">       </span>else</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><span class="Apple-tab-span" style="white-space:pre">    </span>{</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><span
 class="Apple-tab-span" style="white-space:pre">         </span></span><span style="font-family: 'times new roman', 'new york', times, serif;">mapPanel.map.layers[1].moveTo(new OpenLayers.Bounds(116, 4, 128, 21.61).transform(geographic, mercator), true, true);</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><span class="Apple-tab-span" style="white-space:pre">              </span>//I also tried </span><span style="font-family: 'times new roman', 'new york', times, serif; ">mapPanel.map.layers[1].extent = new OpenLayers.Bounds(116, 4, 128, 22).transform</span><span style="font-family: 'times new roman', 'new york', times, serif; ">(geographic, mercator), true, true)</span><span style="font-family: 'times new roman', 'new york', times, serif; ">;</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><span class="Apple-tab-span" style="white-space:pre">      </span>}</span></div><div><span
 style="font-family: 'times new roman', 'new york', times, serif;">}</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><br></span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">Here's a code of how I called my layer:</span></div><div><span><div><span style="font-family: 'times new roman', 'new york', times, serif;">new OpenLayers.Layer.Image</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">                        (</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">                                "Pressure - Interpolated",</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">               
                 "/html/pressure_inter.png",</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">                                image_bounds,</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">                                </span><span style="font-family: 'times new roman', 'new york', times, serif; ">new OpenLayers.Size(1050 ,800),</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">                                {</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">               
                       isBaseLayer: false,</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">                                      buffer: 0,</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">                                    </span><span style="font-family: 'times new roman', 'new york', times, serif; ">  transitionEffect: "resize",</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">                                </span><span style="font-family: 'times new roman', 'new york', times, serif;
 ">}</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">                        );</span></div><div style="font-family: 'times new roman', 'new york', times, serif; "><br></div></span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><br></span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">mapPanel.map.layers[1].redraw();</span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;"><br></span></div><div><span style="font-family: 'times new roman', 'new york', times, serif;">I Am I using moveTo() correctly? Any help would be much appreciated. Thanks a lot.</span></div></div></body></html>