[libchamplain] Added the possibility to use TMS correct y-axis.



commit a47ab6e8a99469f547ec83326c62101d53bb9405
Author: Samuel Gyger <samuel gyger at>
Date:   Sat Jul 21 18:44:12 2012 +0200

    Added the possibility to use TMS correct y-axis.

 champlain/champlain-network-tile-source.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/champlain/champlain-network-tile-source.c b/champlain/champlain-network-tile-source.c
index 438dada..b10d95b 100644
--- a/champlain/champlain-network-tile-source.c
+++ b/champlain/champlain-network-tile-source.c
@@ -511,6 +511,10 @@ get_tile_uri (ChamplainNetworkTileSource *tile_source,
         number = x;
       if (strcmp (token, "Y") == 0)
         number = y;
+      if (strcmp (token, "TMSY") == 0){
+        int ymax = 1 << z;
+        number = ymax - y - 1;
+      }
       if (strcmp (token, "Z") == 0)
         number = z;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]