c8f3815f by chiangbt

更新天地图山东及江苏

1 parent 60687c93
......@@ -24,7 +24,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -24,14 +24,14 @@
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@style/AppTheme.NoActionBar"> <!-- 禁止屏幕旋转 -->
</activity>
<activity android:name=".GoogleMapActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".GoogleMapActivity">
</activity>
<activity android:name=".BaiduMapActivity">
</activity>
......
......@@ -159,9 +159,9 @@ public class MainActivity extends AppCompatActivity {
});
// 添加地图图层
t_vec = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.VEC_C);
t_vec = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.IMG_C_SD);
mapView.addLayer(t_vec);
t_cva = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.CVA_C);
t_cva = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.CIA_C_SD);
mapView.addLayer(t_cva);
// 一个本地sqlite数据库,注意其只有8-9级数据,因此在数据层中予以了显示控制
t_local = new TianDiTuLocalTiledMapServiceLayer("my.db", "IMG_C");
......
......@@ -55,7 +55,19 @@ public enum TianDiTuLayerTypes implements BaseTiledMapServiceType {
/**
* 江苏矢量地图注记
*/
CVA_C_JS;
CVA_C_JS,
/**
* 山东矢量地图(包含注记)
*/
VEC_C_SD,
/**
* 山东影像地图
*/
IMG_C_SD,
/**
* 山东影像地图注记
*/
CIA_C_SD;
public void setName()
{
......
......@@ -220,10 +220,22 @@ public class TianDiTuTiledMapServiceLayer extends TiledServiceLayer {
url = new StringBuilder("http://58.213.29.198/serviceaccess/wmts/JSMapZJ7_14?service=WMTS&request=GetTile&version=1.0.0&tileSize=256&layer=0&style=default&tilematrixSet=JSMapZJ7_14&format=Image/png&height=256&width=256&maptype=js_vec_anno&tilematrix=");
url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col);
break;
case VEC_C_SD:
url = new StringBuilder("http://www.sdmap.gov.cn/tileservice/SDPubMap?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=sdvec&STYLE=default&TILEMATRIXSET=c&FORMAT=image/png&TILEMATRIX=");
url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col);
break;
case IMG_C_SD:
url = new StringBuilder("http://www.sdmap.gov.cn/tileservice/SdRasterPubMap?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=sdimg2017&STYLE=default&TILEMATRIXSET=img2017&FORMAT=image/png&TILEMATRIX=");
url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col);
break;
case CIA_C_SD:
url = new StringBuilder("http://www.sdmap.gov.cn/tileservice/SDRasterPubMapDJ?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=sdcia&STYLE=default&TILEMATRIXSET=sdcia&FORMAT=image/png&TILEMATRIX=");
url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col);
break;
default:
return null;
}
Log.i("map",url.toString());
Log.i("map", url.toString());
try {
// 首先从离线数据库中读取
result = getOfflineCacheDB(level, col, row);
......
......@@ -20,7 +20,7 @@ public class AppInfo {
public static SQLiteDatabase mapcachedb;
// 天安门广场
public static Point initPoint = new Point(118.778644, 32.05212);
public static Point initPoint = new Point(117.021129, 36.669591);
public static double initRes = TDTTileinfo.getRes4490()[17];
// public static double initRes = TDTTileinfo.getRes4326()[6];
......