diff options
author | Jonas Danielsson <jonas@threetimestwo.org> | 2015-08-16 23:04:28 +0200 |
---|---|---|
committer | Jiří Techet <techet@gmail.com> | 2015-08-31 00:58:47 +0200 |
commit | 1549c0332ba16d033b315b5341dc2d26377821f4 (patch) | |
tree | 620fabbb5240ea96cfdd715be2b4e188a2bd31f7 | |
parent | 85e51f87c2af781c423e75da3a725c459bf1cf49 (diff) | |
download | libchamplain-1549c0332ba16d033b315b5341dc2d26377821f4.tar.gz |
defines: Min/max latitude should be 85.05113
So it seems that the map_source_get_y breaks down when
given values close to +-90. Some googling brought me to the
conclusion that we should have a MIN/MAX latitude of
85.05113, since that is what the Mercator projection
truncates latitude to.
See https://en.wikipedia/wiki/Mercator_projection for
more information,
-rw-r--r-- | champlain/champlain-defines.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/champlain/champlain-defines.h b/champlain/champlain-defines.h index d8ad82f..8b6f081 100644 --- a/champlain/champlain-defines.h +++ b/champlain/champlain-defines.h @@ -25,8 +25,15 @@ #define CHAMPLAIN_API __attribute__((visibility ("default"))) -#define CHAMPLAIN_MIN_LATITUDE -90.0 -#define CHAMPLAIN_MAX_LATITUDE 90.0 +/* + * The ordinate y of the Mercator projection becomes infinite at the poles + * and the map must be truncated at some latitude less than ninety degrees. + * + * Using a square aspect ratio for the map, the maximum latitude shown is + * approximately 85.05113 degrees. + */ +#define CHAMPLAIN_MIN_LATITUDE -85.05113 +#define CHAMPLAIN_MAX_LATITUDE 85.05113 #define CHAMPLAIN_MIN_LONGITUDE -180.0 #define CHAMPLAIN_MAX_LONGITUDE 180.0 |