Update XYZ tile layer base URL similar with QGIS

This commit is contained in:
wyq 2025-03-26 14:11:31 +08:00
parent e7f88b3eee
commit e9e58cca91
34 changed files with 245 additions and 189 deletions

View File

@ -69,7 +69,7 @@ import java.util.zip.ZipInputStream;
public static String getVersion() {
String version = GlobalUtil.class.getPackage().getImplementationVersion();
if (version == null || version.equals("")) {
version = "3.9.11";
version = "4.0";
}
return version;
}

View File

@ -19,8 +19,7 @@ public class AHybridMapInfo extends TileFactoryInfo {
public AHybridMapInfo() {
super("AHybridMap", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://wprd03.is.autonavi.com/appmaptile?style=8&x=%1$d&y=%2$d&z=%3$d",
"x", "y", "z");
"http://wprd03.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
@ -28,11 +27,11 @@ public class AHybridMapInfo extends TileFactoryInfo {
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, x, y, zoom);
return url;
}
}*/
// </editor-fold>
}

View File

@ -19,8 +19,7 @@ public class AMapInfo extends TileFactoryInfo {
public AMapInfo() {
super("AMap", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://wprd03.is.autonavi.com/appmaptile?style=7&x=%1$d&y=%2$d&z=%3$d",
"x", "y", "z");
"http://wprd03.is.autonavi.com/appmaptile?style=7&x={x}&y={y}&z={z}");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
@ -28,11 +27,11 @@ public class AMapInfo extends TileFactoryInfo {
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, x, y, zoom);
return url;
}
}*/
// </editor-fold>
}

View File

@ -19,8 +19,7 @@ public class ASatelliteMapInfo extends TileFactoryInfo {
public ASatelliteMapInfo() {
super("ASatelliteMap", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://wprd03.is.autonavi.com/appmaptile?style=6&x=%1$d&y=%2$d&z=%3$d",
"x", "y", "z");
"http://wprd03.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
@ -28,11 +27,11 @@ public class ASatelliteMapInfo extends TileFactoryInfo {
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, x, y, zoom);
return url;
}
}*/
// </editor-fold>
}

View File

@ -19,19 +19,18 @@ public class ArcGISImageInfo extends TileFactoryInfo {
public ArcGISImageInfo() {
super("ArcGISImage", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/tile/%1$d/%2$d/%3$d",
"x", "y", "z");
"http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_Imagery_World_2D/MapServer/tile/{z}/{y}/{x}");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, zoom, y, x);
return url;
}
}*/
// </editor-fold>
}

View File

@ -21,8 +21,7 @@ public class BingHybridMapInfo extends TileFactoryInfo {
public BingHybridMapInfo() {
super("BingHybridMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://ecn.t%1$d.tiles.virtualearth.net/tiles/h%2$s.jpeg?g=%3$s&mkt=%4$s&n=z%5$s",
"x", "y", "z");
"http://ecn.t%1$d.tiles.virtualearth.net/tiles/h%2$s.jpeg?g=%3$s&mkt=%4$s&n=z%5$s");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
@ -37,7 +36,7 @@ public class BingHybridMapInfo extends TileFactoryInfo {
String ckey = this.clientKey;
if (ckey == null)
ckey = "";
String url = String.format(this.baseURL, serverNum, key, version, this.getLanguage(), zoom, x, y);
String url = String.format(this.baseURL, serverNum, key, version, this.getLanguage(), zoom);
return url;
}

View File

@ -22,12 +22,7 @@ public class BingMapInfo extends TileFactoryInfo {
public BingMapInfo() {
super("BingMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://ecn.t%1$d.tiles.virtualearth.net/tiles/r%2$s?g=%3$s&mkt=%4$s&lbl=l1&stl=h&shading=hill&n=z%5$s",
"x", "y", "z");
// super("BingMap", 1, 17, 19,
// 256, true, true, // tile size is 256 and x/y orientation is normal
// "http://t%1$d.tiles.ditu.live.com/tiles/r%2$s.png?g=%3$s&mkt=%4$s&n=z%5$s",
// "x", "y", "z");
"http://ecn.t%1$d.tiles.virtualearth.net/tiles/r%2$s?g=%3$s&mkt=%4$s&lbl=l1&stl=h&shading=hill&n=z%5$s");
if (this.getLanguage().equals("zh-cn"))
this.baseURL = "http://t%1$d.tiles.ditu.live.com/tiles/r%2$s.png?g=%3$s&mkt=%4$s&n=z%5$s";
}

View File

@ -21,8 +21,7 @@ public class BingSatelliteMapInfo extends TileFactoryInfo {
public BingSatelliteMapInfo() {
super("BingSatelliteMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://ecn.t%1$d.tiles.virtualearth.net/tiles/a%2$s.jpeg?g=%3$s&mkt=%4$s&n=z%5$s",
"x", "y", "z");
"http://ecn.t%1$d.tiles.virtualearth.net/tiles/a%2$s.jpeg?g=%3$s&mkt=%4$s&n=z%5$s");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
@ -37,7 +36,7 @@ public class BingSatelliteMapInfo extends TileFactoryInfo {
String ckey = this.clientKey;
if (ckey == null)
ckey = "";
String url = String.format(this.baseURL, serverNum, key, version, this.getLanguage(), zoom, x, y);
String url = String.format(this.baseURL, serverNum, key, version, this.getLanguage(), zoom);
return url;
}

View File

@ -15,20 +15,19 @@ public class CMACvaMapInfo extends TileFactoryInfo {
public CMACvaMapInfo() {
super("CMA_CVA_MAP", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://10.1.64.154/DataServer?T=cva_w&X=%1$d&Y=%2$d&L=%3$d",
"x", "y", "z");
"http://10.1.64.154/DataServer?T=cva_w&X={x}&Y={y}&L={z}");
}
// // </editor-fold>
// </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, x, y, zoom);
return url;
}
}*/
// </editor-fold>
}

View File

@ -15,20 +15,19 @@ public class CMAImgMapInfo extends TileFactoryInfo {
public CMAImgMapInfo() {
super("CMA_IMG_MAP", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://10.1.64.154/DataServer?T=img_w&X=%1$d&Y=%2$d&L=%3$d",
"x", "y", "z");
"http://10.1.64.154/DataServer?T=img_w&X={x}&Y={y}&L={z}");
}
// // </editor-fold>
// </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, x, y, zoom);
return url;
}
}*/
// </editor-fold>
}

View File

@ -15,20 +15,19 @@ public class CMAVecMapInfo extends TileFactoryInfo {
public CMAVecMapInfo() {
super("CMA_VEC_MAP", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://10.1.64.154/DataServer?T=vec_w&X=%1$d&Y=%2$d&L=%3$d",
"x", "y", "z");
"http://10.1.64.154/DataServer?T=vec_w&X={x}&Y={y}&L={z}");
}
// // </editor-fold>
// </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, x, y, zoom);
return url;
}
}*/
// </editor-fold>
}

View File

@ -19,20 +19,19 @@ public class GeoQBlueMapInfo extends TileFactoryInfo {
public GeoQBlueMapInfo() {
super("GeoQMap", 0, 16, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/%1$d/%2$d/%3$d",
"x", "y", "z");
"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}");
}
// // </editor-fold>
// </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, zoom, y, x);
return url;
}
}*/
// </editor-fold>
}

View File

@ -19,20 +19,19 @@ public class GeoQGrayMapInfo extends TileFactoryInfo {
public GeoQGrayMapInfo() {
super("GeoQMap", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer/tile/%1$d/%2$d/%3$d",
"x", "y", "z");
"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer/tile/{z}/{y}/{x}");
}
// // </editor-fold>
// </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, zoom, y, x);
return url;
}
}*/
// </editor-fold>
}

View File

@ -19,20 +19,19 @@ public class GeoQMapInfo extends TileFactoryInfo {
public GeoQMapInfo() {
super("GeoQMap", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/%1$d/%2$d/%3$d",
"x", "y", "z");
"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}");
}
// // </editor-fold>
// </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, zoom, y, x);
return url;
}
}*/
// </editor-fold>
}

View File

@ -19,20 +19,19 @@ public class GeoQWarmMapInfo extends TileFactoryInfo {
public GeoQWarmMapInfo() {
super("GeoQMap", 0, 18, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer/tile/%1$d/%2$d/%3$d",
"x", "y", "z");
"https://map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer/tile/{z}/{y}/{x}");
}
// // </editor-fold>
// </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, zoom, y, x);
return url;
}
}*/
// </editor-fold>
}

View File

@ -22,18 +22,17 @@ public class GoogleCNMapInfo extends TileFactoryInfo {
public GoogleCNMapInfo() {
super("GoogleCNMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x=%1$d&y=%2$d&z=%3$d",
"x", "y", "z");
"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x={x}&y={y}&z={z}");
}
// </editor-fold>
// <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, x, y, zoom);
return url;
}
}*/
// </editor-fold>
}

View File

@ -22,18 +22,17 @@ public class GoogleCNSatelliteMapInfo extends TileFactoryInfo {
public GoogleCNSatelliteMapInfo() {
super("GoogleCNSatelliteMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x=%1$d&y=%2$d&z=%3$d",
"x", "y", "z");
"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}");
}
// </editor-fold>
// <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, x, y, zoom);
return url;
}
}*/
// </editor-fold>
}

View File

@ -22,18 +22,17 @@ public class GoogleCNTerrainMapInfo extends TileFactoryInfo {
public GoogleCNTerrainMapInfo() {
super("GoogleCNTerrainMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=p&x=%1$d&y=%2$d&z=%3$d",
"x", "y", "z");
"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=p&x={x}&y={y}&z={z}");
}
// </editor-fold>
// <editor-fold desc="Methods">
@Override
/*@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, x, y, zoom);
return url;
}
}*/
// </editor-fold>
}

View File

@ -19,8 +19,7 @@ public class GoogleHybridMapInfo extends TileFactoryInfo {
public GoogleHybridMapInfo() {
super("GoogleHybridMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://mt1.google.cn/vt/lyrs=y&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil",
"x", "y", "z");
"http://mt1.google.cn/vt/lyrs=y&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">

View File

@ -19,8 +19,7 @@ public class GoogleHybridTerrainMapInfo extends TileFactoryInfo {
public GoogleHybridTerrainMapInfo() {
super("GoogleHybridTerrainMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://mt2.google.cn/vt/lyrs=p&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil",
"x", "y", "z");
"http://mt2.google.cn/vt/lyrs=p&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">

View File

@ -22,10 +22,7 @@ public class GoogleMapInfo extends TileFactoryInfo {
public GoogleMapInfo() {
super("GoogleMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://mt2.google.cn/vt/lyrs=m&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil",
"x", "y", "z");
//String url = "http://mt1.google.com/vt/lyrs=m@129&hl=%1$s&x=%2$d&y=%3$d&z=%4$d&s=Galileo";
//this.baseURL = url;
"http://mt2.google.cn/vt/lyrs=m&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
@ -36,7 +33,6 @@ public class GoogleMapInfo extends TileFactoryInfo {
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, this.getLanguage(), x, y, zoom);
//String url = String.format(this.baseURL, x, y, zoom, this.getLanguage());
return url;
}
/// <summary>

View File

@ -9,8 +9,7 @@ package org.meteoinfo.data.mapdata.webmap;
* @author yaqiang
*/
public class GoogleSatelliteMapInfo extends TileFactoryInfo {
// <editor-fold desc="Variables">
// </editor-fold>
// <editor-fold desc="Constructor">
/**
@ -19,20 +18,16 @@ public class GoogleSatelliteMapInfo extends TileFactoryInfo {
public GoogleSatelliteMapInfo() {
super("GoogleSatelliteMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://mt3.google.cn/vt/lyrs=s&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil",
"x", "y", "z");
"http://mt3.google.cn/vt/lyrs=s&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
// </editor-fold>
// <editor-fold desc="Methods">
@Override
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, this.getLanguage(), x, y, zoom);
//String url = String.format(this.baseURL, x, y, zoom);
return url;
}
// </editor-fold>

View File

@ -9,8 +9,7 @@ package org.meteoinfo.data.mapdata.webmap;
* @author yaqiang
*/
public class GoogleTerrainMapInfo extends TileFactoryInfo {
// <editor-fold desc="Variables">
// </editor-fold>
// <editor-fold desc="Constructor">
/**
@ -19,14 +18,11 @@ public class GoogleTerrainMapInfo extends TileFactoryInfo {
public GoogleTerrainMapInfo() {
super("GoogleTerrainMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://mt0.google.cn/vt/lyrs=t&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil",
"x", "y", "z");
"http://mt0.google.cn/vt/lyrs=t&hl=%1$s&gl=cn&x=%2$d&y=%3$d&z=%4$d&s=Galil");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
// </editor-fold>
// <editor-fold desc="Methods">
@Override
public String getTileUrl(int x, int y, int zoom) {

View File

@ -19,8 +19,11 @@ public class OpenStreetMapInfo extends TileFactoryInfo {
public OpenStreetMapInfo() {
super("OpenStreetMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"https://tile.openstreetmap.de/%1$d/%2$d/%3$d.png",//5/15/10.png",
"x", "y", "z");
"https://tile.openstreetmap.de/{z}/{x}/{y}.png");
// super("OpenStreetMap", 1, 17, 19,
// 256, true, true, // tile size is 256 and x/y orientation is normal
// "https://tile.openstreetmap.de/%1$d/%2$d/%3$d.png",//5/15/10.png",
// "x", "y", "z");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">

View File

@ -19,8 +19,7 @@ public class OpenStreetMapQuestSatelliteInfo extends TileFactoryInfo {
public OpenStreetMapQuestSatelliteInfo() {
super("OpenStreetMapQuestSatellite", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://otile%1$d.mqcdn.com/tiles/1.0.0/sat/%2$d/%3$d/%4$d.jpg",//5/15/10.png",
"x", "y", "z");
"http://otile%1$d.mqcdn.com/tiles/1.0.0/sat/%2$d/%3$d/%4$d.jpg");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">

View File

@ -20,13 +20,11 @@ public class OviHybridMapInfo extends TileFactoryInfo {
public OviHybridMapInfo() {
super("OviHybridMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://%1$s.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/hybrid.day/%2$d/%3$d/%4$d/256/png8",//5/15/10.png",
"x", "y", "z");
"http://%1$s.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/hybrid.day/%2$d/%3$d/%4$d/256/png8");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
// </editor-fold>
// <editor-fold desc="Methods">
@Override
public String getTileUrl(int x, int y, int zoom) {

View File

@ -20,13 +20,11 @@ public class OviMapInfo extends TileFactoryInfo {
public OviMapInfo() {
super("OviMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://%1$s.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/normal.day/%2$d/%3$d/%4$d/256/png8",//5/15/10.png",
"x", "y", "z");
"http://%1$s.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/normal.day/%2$d/%3$d/%4$d/256/png8");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
// </editor-fold>
// <editor-fold desc="Methods">
@Override
public String getTileUrl(int x, int y, int zoom) {

View File

@ -20,13 +20,11 @@ public class OviSatelliteMapInfo extends TileFactoryInfo {
public OviSatelliteMapInfo() {
super("OviSatelliteMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://%1$s.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/satellite.day/%2$d/%3$d/%4$d/256/png8",//5/15/10.png",
"x", "y", "z");
"http://%1$s.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/satellite.day/%2$d/%3$d/%4$d/256/png8");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
// </editor-fold>
// <editor-fold desc="Methods">
@Override
public String getTileUrl(int x, int y, int zoom) {

View File

@ -20,13 +20,11 @@ public class OviTerrainMapInfo extends TileFactoryInfo {
public OviTerrainMapInfo() {
super("OviTerrainMap", 1, 17, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://%1$s.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/terrain.day/%2$d/%3$d/%4$d/256/png8",//5/15/10.png",
"x", "y", "z");
"http://%1$s.maptile.maps.svc.ovi.com/maptiler/v2/maptile/newest/terrain.day/%2$d/%3$d/%4$d/256/png8");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">
// // </editor-fold>
// // <editor-fold desc="Methods">
// </editor-fold>
// <editor-fold desc="Methods">
@Override
public String getTileUrl(int x, int y, int zoom) {

View File

@ -19,8 +19,7 @@ public class TencentMapInfo extends TileFactoryInfo {
public TencentMapInfo() {
super("TencentMap", 0, 16, 19,
256, true, true, // tile size is 256 and x/y orientation is normal
"http://rt1.map.gtimg.com/tile?z=%1$d&x=%2$d&y=%3$d&styleid=1&version=117",
"x", "y", "z");
"http://rt1.map.gtimg.com/tile?z=%1$d&x=%2$d&y=%3$d&styleid=1&version=117");
}
// // </editor-fold>
// // <editor-fold desc="Get Set Methods">

View File

@ -21,9 +21,9 @@ import java.util.Locale;
*/
public class TileFactoryInfo {
protected int minimumZoomLevel;
protected int maximumZoomLevel;
protected int totalMapZoom;
protected int minimumZoomLevel = 0;
protected int maximumZoomLevel = 18;
protected int totalMapZoom = 19;
// the size of each tile (assumes they are square)
private int tileSize = 256;
/*
@ -50,9 +50,9 @@ public class TileFactoryInfo {
* The base url for loading tiles from.
*/
protected String baseURL;
private String xparam;
private String yparam;
private String zparam;
private String xparam = "x";
private String yparam = "y";
private String zparam = "z";
private boolean xr2l = true;
private boolean yt2b = true;
private int defaultZoomLevel = 1;
@ -65,8 +65,71 @@ public class TileFactoryInfo {
/**
* Creates a new instance of TileFactoryInfo. Note that TileFactoryInfo
* should be considered invariate, meaning that subclasses should ensure all
* of the properties stay the same after the class is constructed. Returning
* should be considered invariant, meaning that subclasses should ensure all
* the properties stay the same after the class is constructed. Returning
* different values of getTileSize() for example is considered an error and
* may result in unexpected behavior.
*
* @param minimumZoomLevel The minimum zoom level
* @param maximumZoomLevel the maximum zoom level
* @param tileSize the size of the tiles in pixels (must be square)
* @param baseURL the base url for grabbing tiles
*/
public TileFactoryInfo(int minimumZoomLevel, int maximumZoomLevel,
int tileSize, String baseURL) {
this(minimumZoomLevel, maximumZoomLevel,
19, tileSize, true, true, baseURL, "x", "y",
"z");
}
/**
* Creates a new instance of TileFactoryInfo. Note that TileFactoryInfo
* should be considered invariant, meaning that subclasses should ensure all
* the properties stay the same after the class is constructed. Returning
* different values of getTileSize() for example is considered an error and
* may result in unexpected behavior.
*
* @param name The name
* @param minimumZoomLevel The minimum zoom level
* @param maximumZoomLevel the maximum zoom level
* @param tileSize the size of the tiles in pixels (must be square)
* @param baseURL the base url for grabbing tiles
*/
public TileFactoryInfo(String name, int minimumZoomLevel, int maximumZoomLevel,
int tileSize, String baseURL) {
this(name, minimumZoomLevel, maximumZoomLevel,
19, tileSize, true, true, baseURL, "x", "y",
"z");
}
/**
* Creates a new instance of TileFactoryInfo. Note that TileFactoryInfo
* should be considered invariant, meaning that subclasses should ensure all
* the properties stay the same after the class is constructed. Returning
* different values of getTileSize() for example is considered an error and
* may result in unexpected behavior.
*
* @param minimumZoomLevel The minimum zoom level
* @param maximumZoomLevel the maximum zoom level
* @param totalMapZoom the top zoom level, essentially the height of the
* pyramid
* @param tileSize the size of the tiles in pixels (must be square)
* @param xr2l if the x goes r to l (is this backwards?)
* @param yt2b if the y goes top to bottom
* @param baseURL the base url for grabbing tiles
*/
public TileFactoryInfo(int minimumZoomLevel, int maximumZoomLevel, int totalMapZoom,
int tileSize, boolean xr2l, boolean yt2b,
String baseURL) {
this(minimumZoomLevel, maximumZoomLevel,
totalMapZoom, tileSize, xr2l, yt2b, baseURL, "x", "y",
"z");
}
/**
* Creates a new instance of TileFactoryInfo. Note that TileFactoryInfo
* should be considered invariant, meaning that subclasses should ensure all
* the properties stay the same after the class is constructed. Returning
* different values of getTileSize() for example is considered an error and
* may result in unexpected behavior.
*
@ -82,12 +145,6 @@ public class TileFactoryInfo {
* @param yparam the y parameter for the tile url
* @param zparam the z parameter for the tile url
*/
/*
* @param xr2l true if tile x is measured from the far left of the map to the far right, or
* else false if based on the center line.
* @param yt2b true if tile y is measured from the top (north pole) to the bottom (south pole)
* or else false if based on the equator.
*/
public TileFactoryInfo(int minimumZoomLevel, int maximumZoomLevel, int totalMapZoom,
int tileSize, boolean xr2l, boolean yt2b,
String baseURL, String xparam, String yparam, String zparam) {
@ -98,8 +155,32 @@ public class TileFactoryInfo {
/**
* Creates a new instance of TileFactoryInfo. Note that TileFactoryInfo
* should be considered invariate, meaning that subclasses should ensure all
* of the properties stay the same after the class is constructed. Returning
* should be considered invariant, meaning that subclasses should ensure all
* the properties stay the same after the class is constructed. Returning
* different values of getTileSize() for example is considered an error and
* may result in unexpected behavior.
*
* @param name A name to identify this information.
* @param minimumZoomLevel The minimum zoom level
* @param maximumZoomLevel the maximum zoom level
* @param totalMapZoom the top zoom level, essentially the height of the
* pyramid
* @param tileSize the size of the tiles in pixels (must be square)
* @param xr2l if the x goes r to l (is this backwards?)
* @param yt2b if the y goes top to bottom
* @param baseURL the base url for grabbing tiles
*/
public TileFactoryInfo(String name, int minimumZoomLevel, int maximumZoomLevel, int totalMapZoom,
int tileSize, boolean xr2l, boolean yt2b,
String baseURL) {
this(name, minimumZoomLevel, maximumZoomLevel, totalMapZoom, tileSize, xr2l, yt2b, baseURL,
"x", "y", "z");
}
/**
* Creates a new instance of TileFactoryInfo. Note that TileFactoryInfo
* should be considered invariant, meaning that subclasses should ensure all
* the properties stay the same after the class is constructed. Returning
* different values of getTileSize() for example is considered an error and
* may result in unexpected behavior.
*
@ -116,12 +197,6 @@ public class TileFactoryInfo {
* @param yparam the y parameter for the tile url
* @param zparam the z parameter for the tile url
*/
/*
* @param xr2l true if tile x is measured from the far left of the map to the far right, or
* else false if based on the center line.
* @param yt2b true if tile y is measured from the top (north pole) to the bottom (south pole)
* or else false if based on the equator.
*/
public TileFactoryInfo(String name, int minimumZoomLevel, int maximumZoomLevel, int totalMapZoom,
int tileSize, boolean xr2l, boolean yt2b,
String baseURL, String xparam, String yparam, String zparam) {
@ -172,9 +247,15 @@ public class TileFactoryInfo {
return minimumZoomLevel;
}
// public void setMinimumZoomLevel(int minimumZoomLevel) {
// this.minimumZoomLevel = minimumZoomLevel;
// }
/**
* Set minimum zoom level
*
* @param minimumZoomLevel Minimum zoom level
*/
public void setMinimumZoomLevel(int minimumZoomLevel) {
this.minimumZoomLevel = minimumZoomLevel;
}
/**
* Get maximum zoom level
*
@ -183,24 +264,33 @@ public class TileFactoryInfo {
public int getMaximumZoomLevel() {
return maximumZoomLevel;
}
//
// public void setMaximumZoomLevel(int maximumZoomLevel) {
// this.maximumZoomLevel = maximumZoomLevel;
// }
/**
* Get total map zoom
*
* @return Total map zoom
* Set maximum zoom level
*
* @param maximumZoomLevel Maximum zoom level
*/
public void setMaximumZoomLevel(int maximumZoomLevel) {
this.maximumZoomLevel = maximumZoomLevel;
}
/**
* Get total map zoom level number
*
* @return Total map zoom level number
*/
public int getTotalMapZoom() {
return totalMapZoom;
}
/*
public void setTotalMapZoom(int totalMapZoom) {
this.totalMapZoom = totalMapZoom;
}
/**
* Set total map zoom level number
*
* @param totalMapZoom Total map zoom level number
*/
public void setTotalMapZoom(int totalMapZoom) {
this.totalMapZoom = totalMapZoom;
}
/**
* Get map width in tiles at zoom
@ -224,7 +314,7 @@ public class TileFactoryInfo {
/**
* Returns the tile url for the specified tile at the specified zoom level.
* By default it will generate a tile url using the base url and parameters
* By default, it will generate a tile url using the base url and parameters
* specified in the constructor. Thus if
*
* <PRE><CODE>baseURl = http://www.myserver.com/maps?version=0.1
@ -251,8 +341,13 @@ public class TileFactoryInfo {
*/
public String getTileUrl(int x, int y, int zoom) {
zoom = this.getTotalMapZoom() - zoom;
String url = String.format(this.baseURL, zoom, x, y);
return url;
//return String.format(this.baseURL, zoom, x, y);
String tileUrl = this.baseURL.replace("{x}", String.valueOf(x));
tileUrl = tileUrl.replace("{y}", String.valueOf(y));
tileUrl = tileUrl.replace("{z}", String.valueOf(zoom));
return tileUrl;
}
/**

View File

@ -15,6 +15,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.stream.Collectors;
/**
*
@ -134,7 +135,8 @@ public class Index<V> implements Iterable<V>{
} else if (data.get(0) instanceof List) {
return new MultiIndex(data);
} else {
return null;
List<String> dList = (List<String>) data.stream().map(String::valueOf).collect(Collectors.toList());
return new StringIndex(dList);
}
}

View File

@ -1,32 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="milconfig.xml" Type="configurefile">
<Path OpenPath="D:\Working\MIScript\Jython\mis\common_math\signal">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\plot"/>
<Path OpenPath="D:\Working\MIScript\Jython\mis\map\webmap">
<RecentFolder Folder="D:\Temp\test"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math\stats"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\dataframe"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\netcdf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\burf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\test"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\dataconvert"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\grib"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\array"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\common_math\signal"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\test"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\netcdf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\dataframe"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\burf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\grib"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\map\webmap"/>
</Path>
<File>
<OpenedFiles>
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\radar\radar_x_phase_2.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\grib\s2s_babj_1.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\common_math\signal\detrend.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\grib\grib2_ecmwf_3.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\map\webmap\new_tilefactory_tianditu-1.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\map\webmap\air_path.py"/>
</OpenedFiles>
<RecentFiles>
<RecentFile File="D:\Working\MIScript\Jython\mis\io\radar\radar_x_phase_2.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\io\grib\s2s_babj_1.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\common_math\signal\detrend.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\io\grib\grib2_ecmwf_3.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\map\webmap\new_tilefactory_tianditu-1.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\map\webmap\air_path.py"/>
</RecentFiles>
</File>
<Font>
@ -34,5 +36,5 @@
</Font>
<LookFeel DockWindowDecorated="true" LafDecorated="true" Name="FlatDarkLaf"/>
<Figure DoubleBuffering="true"/>
<Startup MainFormLocation="8,11" MainFormSize="1292,764"/>
<Startup MainFormLocation="5,6" MainFormSize="1337,846"/>
</MeteoInfo>

View File

@ -35,7 +35,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<revision>3.9.11</revision>
<revision>4.0</revision>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.compiler.release>8</maven.compiler.release>