Good morning everyone, i'll try to explain the whole situation here: I have a website (django-python) that shows a map using Openlayers. The map has two layers: a background that shows the city names and streets and for that i use openstreetmaps; the second layer contains some greographic information , for that i use MapServer (more specifically,i send the bbox parameter and other stuff to my server and generates the map via mapscript for python).
Now i want to have an "export" button in my website, that must create a .zip file containing an image of the map (among charts and files included in the .zip), so i have to be able to generate the same map that was shown in the openlayers and save it into a file or directly into the .zip.
My first guess was that i could get the coordinates (BBOX) from the openlayers, send those coordinates to python and via url and python could call both servers (mapserver an openmapstreets), save the image in the .zip file... but life is not that easy isn't it? Well it works fine for the mapserver layer, the urls is something like:
but when i try to call the openstreetmaps with the same coordinates, it gives me an error :
An error occurred: can't find resolution index for 1110.000000. Available resolutions are: [4096.0, 2048.0, 1024.0, 512.0, 256.0, 128.0, 64.0, 32.0, 16.0, 8.0, 4.0, 2.0, 1.0, 0.5, 0.25]
so now... i dont know how to call the OSM to generate an image for the coordinates that i give him.. i looked in the openstreetmaps an exemple of export an i think they use the coordinates in some other format maybe??
http://tile.openstreetmap.org/cgi-bin/export?bbox=-1.81,44.71,9.26,50.53&scale=3500000&format=png
If you have any idea how to proceed i'd be great!!!!