Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- ../orig/src_j2se/net/sf/bt747/j2se/app/map/MapFactoryInfos.java
- +++ src_j2se/net/sf/bt747/j2se/app/map/MapFactoryInfos.java
- @@ -45,6 +45,31 @@
- + y;
- }
- };
- +
- + // replace osm cloudmade with local tiles
- + // My tiles were generated by gdal2tiles.pl, which outputs standard TMS that differs from
- + // OSM in that its y coordinate is flipped, see
- + // http://alastaira.wordpress.com/2011/07/06/converting-tms-tile-coordinates-to-googlebingosm-tile-coordinates/
- + public final static MyTileFactoryInfo tfiOSM_OSM_CYCLE_CLOUDMADE = new MyTileFactoryInfo(
- + "local tiles", 2, 18, 19, 256, true, true,
- + "file:///m/pic/slippymap/slippytiles", "x", "y", "z",
- + "Local TMS tiles",
- + "http://www.gdal.org/gdal2tiles.html") {
- + public String getTileUrl(int x, int y, int zoom) {
- + zoom = getTotalMapZoom() - zoom;
- + y = (1 << zoom) - y - 1; // flip y coordinate
- + String url = baseURL + "/" + zoom + "/" + x + "/" + y + ".png";
- + return url;
- + }
- +
- + public String getTileBaseKey(int x, int y, int zoom) {
- + zoom = getTotalMapZoom() - zoom;
- + return "" + zoom + File.separatorChar + x + File.separatorChar
- + + y;
- + }
- + };
- +
- +/*
- public final static MyTileFactoryInfo tfiOSM_OSM_CYCLE_CLOUDMADE = new MyTileFactoryInfo(
- "osmcycle_cloudmade", 2, 18, 19, 256, true, true,
- "http://andy.sandbox.cloudmade.com/tiles/cycle", "x", "y", "z",
- @@ -62,7 +87,8 @@
- + y;
- }
- };
- -
- +*/
- +
- public final static MyTileFactoryInfo tfiOSM_OSM_CYCLE_THUNDER = new MyTileFactoryInfo(
- "osmcycle_thunder", 4, 18, 19, 256, true, true,
- "http://www.thunderflames.org/tiles/cycle", "x", "y", "z",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement