[OSM-talk] [OSM-dev] Online/offline slippy map finished.
Christopher Schmidt
crschmidt at metacarta.com
Fri May 9 15:26:25 BST 2008
On Fri, May 09, 2008 at 04:09:28PM +0200, Juan Lucas Dominguez Rubio wrote:
> lol, thank you Sebastian for that code. I have tested it on Windows XP and the only problem is that images are not shown, everything else seems to be in place. I don't think it's because of using / instead of \. Apparently the HttpServer only delivers the first bytes of the PNG files, and then closes the connection. I have tried to add the file length and proper file type in the header but it still closes the connection too soon.
>
> wget.exe is unable to get the whole image file either.
> I'll keep on trying, lol
On Windows, all Python read/writes have to be opened with "rb"/"rw" instead
of "r"/"w". Changing Line 36 to:
f = open(installpath + path, "rb")
Might do it.
Regards,
--
Christopher Schmidt
MetaCarta
More information about the talk
mailing list