<div class="gmail_quote"><br>Hi,<div>I didn&#39;t sent full code before, </div>
<div><br></div><div>Here i am sending full code:<br></div><div>--------------------------------------------------------------------------------------------------------------------------------------</div><div><div>&lt;html xmlns=&quot;<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>&quot;&gt;</div>

<div>  &lt;head&gt;</div><div>      &lt;title&gt;OpenLayers Image Layer Example&lt;/title&gt;</div><div>    &lt;link rel=&quot;stylesheet&quot; href=&quot;../theme/default/style.css&quot; type=&quot;text/css&quot; /&gt;</div>

<div>    &lt;link rel=&quot;stylesheet&quot; href=&quot;style.css&quot; type=&quot;text/css&quot; /&gt;</div><div>    &lt;style type=&quot;text/css&quot;&gt;</div><div>        p.caption {</div><div>            width: 512px;</div>

<div>        }</div><div>    &lt;/style&gt;</div><div>    &lt;script src=&quot;../lib/OpenLayers.js&quot;&gt;&lt;/script&gt;</div><div>    &lt;script type=&quot;text/javascript&quot;&gt;</div><div>        var map;</div><div class="im">
<div>
        function init(){</div><div>            map = new OpenLayers.Map(&#39;map&#39;);</div><div><br></div></div><div>            var options = {numZoomLevels: 3};</div><div>            //var olbound = new OpenLayers.Bounds(-180, -88.759, 180, 88.759);                          //when activated displays static image pictures map on this but since bounds are not accurate long/lat is not correct</div>

<div>            var olbound = new OpenLayers.Bounds(15.865164, 58.172783,16.651403, 58.620233);  //cannto display pictures plus long/lat also incorrect</div><div>       </div><div>            var graphic = new OpenLayers.Layer.Image(</div>

<div>                                &#39;City Lights&#39;,</div><div>                                &#39;../img/image.24.png&#39;,</div><div class="im"><div>                                olbound,</div><div>                                new OpenLayers.Size(1000, 1000),</div>

</div><div>                                options);</div><div>            </div><div>            map.addLayers([graphic]);</div><div>            map.addControl(new OpenLayers.Control.LayerSwitcher());</div><div>            map.addControl(new OpenLayers.Control.MousePosition());</div>
<div class="im">
<div>            map.zoomToMaxExtent();</div><div>        }</div><div>        map.setCenter(new OpenLayers.LonLat(16.23069, 58.406794), 3);</div></div><div>    &lt;/script&gt;</div><div>  &lt;/head&gt;</div><div>  &lt;body onload=&quot;init()&quot;&gt;</div>

<div>    &lt;h1 id=&quot;title&quot;&gt;Image Layer Example&lt;/h1&gt;</div><div><br></div><div>    &lt;div id=&quot;tags&quot;&gt;&lt;/div&gt;</div><div><br></div><div>    &lt;p id=&quot;shortdesc&quot;&gt;</div><div>        image</div>

<div>    &lt;/p&gt;</div><div><br></div><div>    &lt;div id=&quot;map&quot; class=&quot;smallmap&quot;&gt;&lt;/div&gt;</div><div><br></div><div>    &lt;div id=&quot;docs&quot;&gt;</div><div>        &lt;p class=&quot;caption&quot;&gt;</div>

<div>           Using image which is full size as the world map can really be.</div><div>        &lt;/p&gt;</div><div>    &lt;/div&gt;</div><div>  &lt;/body&gt;</div><div>&lt;/html&gt;</div><div><br></div><div>--------------------------------------------------------------------------------------------------------------------------------</div>

</div>
<div>did i missed something?<br></div><div>I am trying to work on this from many days but didn&#39;t achieve success to display map with correct longitude and latitude value, since i need these values from map on click to start further calculation based on longitude nad latitude value.</div>

<div><br></div><div><br></div><div><br></div><div><br></div><div><br><br><div class="gmail_quote"><div class="im">On Mon, Mar 9, 2009 at 10:52 PM, Pierre GIRAUD <span dir="ltr">&lt;<a href="mailto:bluecarto@gmail.com" target="_blank">bluecarto@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You&#39;re not adding the layer to the map.<br>
<br>
Try the following :<br>
<div><br>
        function init(){<br>
            map = new OpenLayers.Map(&#39;map&#39;);<br>
            var options = { numZoomLevels: 5 };<br>
            var olbound = new OpenLayers.Bounds(15.865164, 58.172783,<br>
16.651403, 58.620233);           //bounds(left,buttom,right,top)<br>
<br>
</div>            var topography = new OpenLayers.Layer.Image(<br>
<div>                &#39;Wrap signals&#39;,<br>
                &#39;img/image.24.png&#39;,<br>
                olbound,<br>
                new OpenLayers.Size(1000, 1000),<br>
//size in pixel of the map<br>
                options<br>
            );<br>
</div>            map.addLayer(topography);<br>
            map.zoomToMaxExtent();<br>
        }<br>
<br>
map.setCenter(new OpenLayers.LonLat(16.23069, 58.406794), 3);</blockquote><div>--------------------------------------------------------------- </div></div><div><div></div><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
<div><div></div><div><br>
On Mon, Mar 9, 2009 at 4:43 PM, nab &lt;nabinr&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; Thanks for the reply,<br>
&gt; here is the code which i used with static map, but the longitued and<br>
&gt; latitude i got is incorrect or sometime i couldnot even get any image loaded<br>
&gt; on the canvas.<br>
&gt; function init(){<br>
&gt;             map = new OpenLayers.Map(&#39;map&#39;);<br>
&gt;             var options = { numZoomLevels: 5 };<br>
&gt;             var olbound = new OpenLayers.Bounds(15.865164, 58.172783,<br>
&gt; 16.651403, 58.620233);           //bounds(left,buttom,right,top)<br>
&gt;<br>
&gt;<br>
&gt;             var topograpy = new OpenLayers.Layer.Image(<br>
&gt;                                 &#39;Wrap signals&#39;,<br>
&gt;                                 &#39;img/image.24.png&#39;, olbound,<br>
&gt;                                 new OpenLayers.Size(1000, 1000),<br>
&gt;        //size in pixel of the map<br>
&gt;                                 options);<br>
&gt;      map.setCenter(new OpenLayers.LonLat(58.406794, 16.23069), 3);<br>
&gt;    }<br>
&gt; I will be thankful, if somebody can help me with this problem.<br>
&gt;<br>
&gt;<br>
&gt; Hi,<br>
&gt;&gt; I had seen your posts and replies in this forum, which is impressive and<br>
&gt;&gt; helped me lot as well while using openlayer.<br>
&gt;&gt; Actaully i am new to openlayer and i am using static map image(jpg) of my<br>
&gt;&gt; city but i could not get correct long/lat value since i use map of very<br>
&gt;&gt; small city, i try to fix it through<br>
&gt;&gt; OpenLayers.Bounds(15.865164, 58.172783, 16.651403, 58.620233) and i set<br>
&gt;&gt; the<br>
&gt;&gt; centre long/lat as 0,0 which is not workin then i set them in to its real<br>
&gt;&gt; long/lat that is also not working.<br>
&gt;&gt; is there any method which i didn&#39;t understood to make static map of my<br>
&gt;&gt; city<br>
&gt;&gt; with long/lat value.<br>
&gt;&gt;<br>
&gt;&gt; The concept that i follow for Bounds and centre are:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;                -------------------------------------(long1, lat1)<br>
&gt;&gt;               |                                     |<br>
&gt;&gt;               |        image (lon,lat)         |<br>
&gt;&gt; (long2,lat2)-------------------------------------<br>
&gt;&gt;<br>
&gt;&gt; i would be very thankful if you could help me.<br>
&gt;&gt;<br>
&gt;&gt; regards,<br>
&gt;&gt; nabin<br>
&gt;<br>
&gt;<br>
</div></div><div><div></div><div>&gt; _______________________________________________<br>
&gt; Users mailing list<br>
&gt; <a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
&gt; <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
--<br>
Pierre GIRAUD<br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a><br>
</div></div></blockquote></div></div></div><br></div>
</div><br>