python - how to export images from an openstreetmap server? -


Good morning everyone, I will try to explain the whole situation here: I have a website (Dégengo-Python) which It shows that there are two layers of a map map using the open layer: A background that shows city names and roads, and for this, I use OpenStreammaps; For the second layer, there is some geographic information, for this, I use the mapers (more specifically, I send the bbox parameter and other stuff for my server and generate a map through the map script for the python).

Now I want my website to have an "export" button, for which to create a .zip file with a picture map (between the charts and the files included in the .zip), so let me do the same map Which should be able to create OpenLayers and save it in a file or directly in .zip

My first estimate was that I could get the coordinates (BBOX) from OpenLayer, sending those coordinates through python and url and python both server (modem to an openmapestates), .zip file Save the image in ... but life is not that easy? The malware works fine for the layer, the URL happens something like this:

But when I try to call openstreetmaps with the same coordinates, I get an error :

  An error occurred: Resolution Index for 1110.000000 can not be found. The available resolutions are as follows: [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]  

Now .. I do not know how to call the OSM to generate an image for the director. I saw them an example of export in OpenStartMaps, I think they use coordinates in any other format ??

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 I would love to move forward !!!!

This example might be what you want:


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -