I'm writing a program to export the map as PDF.
To do that I retrieve a screenshot (using
) of small
parts of the whole map, then move to the next part and so on.
It works, but I have a little problem and I really don't know why it
I move the map with this code:
c = icaoMap.getCenter();
b = icaoMap.getBounds();
if(b.getEast() < routeBounds.east)
// Move to east
w = b.getEast() - b.getWest();
icaoMap.panTo(new L.LatLng(c.lat, c.lng + w));
else if(b.getSouth() > routeBounds.south)
// Back to the west point and move to south
h = b.getNorth() - b.getSouth();
icaoMap.panTo(new L.LatLng(c.lat - h, startLng));
partCol = 1;
As I said, it works, but moving the map to south does not move the
"complete height of the map", but just a part (let say 99,9%), see the
Can someone explain me why the problem happens and how can I do to solve it?