geotiler
geotiler copied to clipboard
map.extend output differs from the extend parameter in the constructor
If I create a map object like this:
m = geotiler.Map(extent=(50.78012548763749,6.047284217876666, 50.78286635348752,6.050775730265756),size=(100,100))
and then later call the map.extend parameter, I get (50.779366493225105, 6.046887877171803, 50.78365802764892, 6.051155516750894) instead. That is quite the difference. How does that come?
Based on the extent and size, the zoom of a map is calculated. After setting the zoom, rarely size of map in pixels will match extents of the map. We have two solutions
- change extents of map to match the requested size in pixels
- change size and keep the extents
GeoTiler assumes that the size of the map image is more important than the map extents, and performs the first operation.
Alternatively, you can set extents and zoom. The map image size will be set to match the extents.
I am closing the issue. However, if you have further questions or suggestions, please shoot.