Hi again,<div>Thank to all, i Figured out my mistake,</div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 0, 80); ">map.zoomToMaxExtent();<br></span></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 0, 80);"><br>
</span></div><div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 0, 80);">I need to use it in correct order which i didn't in correct order. thank you all once again for help and suggestions.</span></div>
<div><span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 0, 80);"><br></span></div><div><br><div class="gmail_quote">On Tue, Mar 10, 2009 at 8:48 AM, nab <span dir="ltr"><<a href="mailto:nabinrs@gmail.com">nabinrs@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div class="h5"><div class="gmail_quote"><br>Hi,<div>I didn't sent full code before, </div>
<div><br></div><div>Here i am sending full code:<br></div><div>--------------------------------------------------------------------------------------------------------------------------------------</div><div><div><html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>"></div>
<div> <head></div><div> <title>OpenLayers Image Layer Example</title></div><div> <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /></div>
<div> <link rel="stylesheet" href="style.css" type="text/css" /></div><div> <style type="text/css"></div><div> p.caption {</div><div> width: 512px;</div>
<div> }</div><div> </style></div><div> <script src="../lib/OpenLayers.js"></script></div><div> <script type="text/javascript"></div><div> var map;</div><div>
<div>
function init(){</div><div> map = new OpenLayers.Map('map');</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> 'City Lights',</div><div> '../img/image.24.png',</div><div><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>
<div> map.zoomToMaxExtent();</div><div> }</div><div> map.setCenter(new OpenLayers.LonLat(16.23069, 58.406794), 3);</div></div><div> </script></div><div> </head></div><div> <body onload="init()"></div>
<div> <h1 id="title">Image Layer Example</h1></div><div><br></div><div> <div id="tags"></div></div><div><br></div><div> <p id="shortdesc"></div><div> image</div>
<div> </p></div><div><br></div><div> <div id="map" class="smallmap"></div></div><div><br></div><div> <div id="docs"></div><div> <p class="caption"></div>
<div> Using image which is full size as the world map can really be.</div><div> </p></div><div> </div></div><div> </body></div><div></html></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'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>On Mon, Mar 9, 2009 at 10:52 PM, Pierre GIRAUD <span dir="ltr"><<a href="mailto:bluecarto@gmail.com" target="_blank">bluecarto@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You're not adding the layer to the map.<br>
<br>
Try the following :<br>
<div><br>
function init(){<br>
map = new OpenLayers.Map('map');<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> 'Wrap signals',<br>
'img/image.24.png',<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><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 <nabinr> wrote:<br>
><br>
><br>
> Thanks for the reply,<br>
> here is the code which i used with static map, but the longitued and<br>
> latitude i got is incorrect or sometime i couldnot even get any image loaded<br>
> on the canvas.<br>
> function init(){<br>
> map = new OpenLayers.Map('map');<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>
><br>
> var topograpy = new OpenLayers.Layer.Image(<br>
> 'Wrap signals',<br>
> 'img/image.24.png', olbound,<br>
> new OpenLayers.Size(1000, 1000),<br>
> //size in pixel of the map<br>
> options);<br>
> map.setCenter(new OpenLayers.LonLat(58.406794, 16.23069), 3);<br>
> }<br>
> I will be thankful, if somebody can help me with this problem.<br>
><br>
><br>
> Hi,<br>
>> I had seen your posts and replies in this forum, which is impressive and<br>
>> helped me lot as well while using openlayer.<br>
>> Actaully i am new to openlayer and i am using static map image(jpg) of my<br>
>> city but i could not get correct long/lat value since i use map of very<br>
>> small city, i try to fix it through<br>
>> OpenLayers.Bounds(15.865164, 58.172783, 16.651403, 58.620233) and i set<br>
>> the<br>
>> centre long/lat as 0,0 which is not workin then i set them in to its real<br>
>> long/lat that is also not working.<br>
>> is there any method which i didn't understood to make static map of my<br>
>> city<br>
>> with long/lat value.<br>
>><br>
>> The concept that i follow for Bounds and centre are:<br>
>><br>
>><br>
>> -------------------------------------(long1, lat1)<br>
>> | |<br>
>> | image (lon,lat) |<br>
>> (long2,lat2)-------------------------------------<br>
>><br>
>> i would be very thankful if you could help me.<br>
>><br>
>> regards,<br>
>> nabin<br>
><br>
><br>
</div></div><div><div></div><div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@openlayers.org" target="_blank">Users@openlayers.org</a><br>
> <a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
><br>
><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>
</div></div></blockquote></div><br></div>