Take the tour ×  Is possible to get bounding box from
coordinates (latitude, longitude), zoom level and size (screen)?
I found only calculating bounding box from tile. I need it,
because OpenStreetMap accept only bbox in export mode. I dont
have any experience with this, so I will be glad for any advice.
Thanks.  share|improve this question Search Tile numbers to
lon./lat. wiki.openstreetmap.org/wiki/… –  Mapperz Dec 3 '12 at
17:15 add comment  1 Answer  Yes, it is. I've had a similar
problem, so I've written it up. Like this:  use Math::Trig;  sub
getLonLat {     my ($xtile, $ytile, $zoom) = @_;     my $n = 2
** $zoom;     my $lon_deg = $xtile / $n * 360.0 - 180.0;     my
$lat_deg = rad2deg(atan(sinh(pi * (1 - 2 * $ytile / $n))));
return ($lon_deg, $lat_deg);  # convert from permalink OSM
format like: # http://www.openstreetmap.org/?lat=43.731049999999
996&lon=15.79375&zoom=13&layers=M # to OSM "Export" iframe
embedded bbox format like: # http://www.openstreetmap.org/export
/embed.html?bbox=15.7444,43.708,