[OpenLayers-Users] need Static image as map of small city with correct longitude and latitude

nab nabinrs at gmail.com
Mon Mar 9 11:43:02 EDT 2009


Thanks for the reply,
here is the code which i used with static map, but the longitued and
latitude i got is incorrect or sometime i couldnot even get any image loaded
on the canvas.

function init(){
            map = new OpenLayers.Map('map');
            var options = { numZoomLevels: 5 };
            var olbound = new OpenLayers.Bounds(15.865164, 58.172783,
16.651403, 58.620233);           //bounds(left,buttom,right,top)


            var topograpy = new OpenLayers.Layer.Image(
                                'Wrap signals',
                                'img/image.24.png', olbound,
                                new OpenLayers.Size(1000, 1000),
       //size in pixel of the map
                                options);

     map.setCenter(new OpenLayers.LonLat(58.406794, 16.23069), 3);
   }

I will be thankful, if somebody can help me with this problem.



Hi,
> I had seen your posts and replies in this forum, which is impressive and
> helped me lot as well while using openlayer.
> Actaully i am new to openlayer and i am using static map image(jpg) of my
> city but i could not get correct long/lat value since i use map of very
> small city, i try to fix it through
> OpenLayers.Bounds(15.865164, 58.172783, 16.651403, 58.620233) and i set
the
> centre long/lat as 0,0 which is not workin then i set them in to its real
> long/lat that is also not working.
> is there any method which i didn't understood to make static map of my
city
> with long/lat value.
>
> The concept that i follow for Bounds and centre are:
>
>
>                -------------------------------------(long1, lat1)
>               |                                     |
>               |        image (lon,lat)         |
> (long2,lat2)-------------------------------------
>
> i would be very thankful if you could help me.
>
> regards,
> nabin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090309/39f14c8f/attachment.html


More information about the Users mailing list