Try this example:<br><br><html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"><br> <head><br> <title>OpenLayers Image Layer Example</title><br> <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /><br>
<link rel="stylesheet" href="style.css" type="text/css" /><br> <script src="../lib/OpenLayers.js"></script><br> <script type="text/javascript"><br>
var map;<br> function init(){<br> map = new OpenLayers.Map('map');<br><br> var graphic = new OpenLayers.Layer.Image(<br> 'City Lights',<br> '<a href="http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif">http://earthtrends.wri.org/images/maps/4_m_citylights_lg.gif</a>',<br>
new OpenLayers.Bounds(-180, -88.759, 180, 88.759),<br> new OpenLayers.Size(580, 288),<br> {numZoomLevels: 1}<br> );<br><br> var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",<br>
"<a href="http://t1.hypercube.telascience.org/cgi-bin/landsat7">http://t1.hypercube.telascience.org/cgi-bin/landsat7</a>", <br> {layers: "landsat7"});<br><br> map.addLayer(jpl_wms);<br>
map.addControl(new OpenLayers.Control.LayerSwitcher());<br> <br> var overview1 = new OpenLayers.Control.OverviewMap({Layers: graphic});<br> map.addControl(overview1);<br> map.zoomToMaxExtent();<br>
}<br> </script><br> </head><br> <body onload="init()"><br> <h1 id="title">OverviewMap with Image Layer Example</h1><br><br> <div id="map" class="smallmap"></div><br>
</body><br></html><br><br><br><br><br><div class="gmail_quote">On Fri, May 15, 2009 at 12:03 AM, Jean-Daniel JDG. GONON <span dir="ltr"><<a href="mailto:jdg@geosphere.fr">jdg@geosphere.fr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="blue" lang="FR">
<div>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Hi</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">As I said in my last
mail, I want to display a .JPG image in an OverviewMap control.</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">I view these sites
(<a href="http://workshops.opengeo.org/openlay.../controls.html" target="_blank">http://workshops.opengeo.org/openlay.../controls.html</a> ,
<a href="http://trac.openlayers.org/wiki/Control/OverviewMap" target="_blank">http://trac.openlayers.org/wiki/Control/OverviewMap</a> ) to help me.</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">To to this display, I
have this code :</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Creation of the image
layer to display in the overviewMap control :</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">minimapImgLayer = new
OpenLayers.Layer.Image('ImageLayer',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> 'C:/ms4w/minicarte/reference.jpg',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> new
OpenLayers.Bounds(937134.75,281924.76,942621,287411.01),</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> new
OpenLayers.Size('150', '150'),</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> {numZoomLevels: '1',
alwaysInRange: true});</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Creation of the main map
with OverviewMap control :</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">ol_Map = new OpenLayers.Map('viewport',
{</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> controls: [ol_miniMap
= new OpenLayers.Control.OverviewMap( {</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> layers:[minimapImgLayer],</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> size: new
OpenLayers.Size('150','150')</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> } )],</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> maxExtent: new
OpenLayers.Bounds(937134.75,281924.76,942621,287411.01),</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> scales:
[25000,10000,5000,2500,1000],</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> maxResolution: '96',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> units: 'm',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> i: 'JPEG',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> tileSize: new
OpenLayers.Size('400','400'),</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> projection:
'init=epsg:27562'</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> }, numZoomLevels =
'5');</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Creation of KaMap layer
for the main map :</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">KaMapLayer = new
OpenLayers.Layer.KaMap( 'Couche_KaMap',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> '<a href="http://localhost/kernel/myKaTile.php" target="_blank">http://localhost/kernel/myKaTile.php</a>',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> { map:
'Couche_KaMap',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> qId:'-1',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> i: 'JPEG',</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;">la:'Couche0,Couche1,Couche2,Couche3,Couche4'</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">});</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
ol_Map.addLayer(KaMapLayer);</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">
ol_Map.zoomToMaxExtent();</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">The main map is displayed
correctely.</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">But nothing is displayed
in OverviewMap control.</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB">Is somebody has an idea
to help me ? ?</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;" lang="EN-GB"> </span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;">Thank you !!</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;">JDG</span></font></p>
<p><font color="navy" size="2" face="Arial"><span style="font-size: 10pt; font-family: Arial; color: navy;"> </span></font></p></div></div></blockquote></div><br><br clear="all"><br>-- <br>Li XinGang<br>EMail: <a href="mailto:slinavlee@gmail.com">slinavlee@gmail.com</a><br>
Blog: <a href="http://avlee.cnblogs.com">avlee.cnblogs.com</a><br>Site: <a href="http://www.mapboost.org">www.mapboost.org</a><br>