mapbox / abaculus

Library for creating static maps from tiles based on center or corner lng,lat coordinates. Uses node-blend.
ISC License
127 stars 38 forks source link

Consider tilesize when calculating the grid #45

Open WMDE-Fisch opened 1 year ago

WMDE-Fisch commented 1 year ago

This never worked before. The calculation for sizes other than 1 did use the right center point for the static image.

The patch fixes that and also adjusts the test for it.

The code is currently used in a different fork that's deployed on the servers used here:

https://maps.wikimedia.org/img/osm-intl,18,43.748,7.434,400x400.png https://maps.wikimedia.org/img/osm-intl,18,43.748,7.434,400x400@2x.png

@2x zooms the stitched tiles.

There's also an older pull request that's a bit outdated now. https://github.com/mapbox/abaculus/pull/39