[josm-dev] Automatic tiles downloading in WMSPlugin
Petr Dlouhý
petr.dlouhy at email.cz
Mon Sep 1 23:18:08 BST 2008
On Mon, 01 Sep 2008 23:51:10 +0200, Petr Dlouhý <petr.dlouhy at email.cz>
wrote:
> I added
>
> //Resizes to the actual bounding box
> window.moveTo(0,0);
> window.resizeTo(new_width,new_height);
>
> to the web page, so the image have the right size. Maybe I get something
> wrong, but I thing, the tiles are fitting.
> Some parts of the images remain white (but "Yahoo" sign is on the right
> place) sometimes, but as I remember, it happend also in the old version.
I solved the problem with white space, it is needed to round-up size of
map containter to 258:
// Resize map container to parameter dimension
var mapDiv = document.getElementById("map");
mapDiv.style.width = Math.ceil(width/258)*258;
mapDiv.style.height = Math.ceil(height/258)*258;
--
Petr Dlouhý
More information about the josm-dev
mailing list