60687c93 by chiangbt

更新高德地图的问题

1 parent 09cac9d1
......@@ -24,7 +24,7 @@
</value>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
......
......@@ -24,6 +24,7 @@
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@style/AppTheme.NoActionBar"> <!-- 禁止屏幕旋转 -->
</activity>
<activity android:name=".GoogleMapActivity">
<intent-filter>
......
......@@ -167,10 +167,10 @@ public class MainActivity extends AppCompatActivity {
t_local = new TianDiTuLocalTiledMapServiceLayer("my.db", "IMG_C");
mapView.addLayer(t_local);
// 添加地图图层
t_img = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.IMG_C);
t_img = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.IMG_C_ZJ);
t_img.setVisible(false);
mapView.addLayer(t_img);
t_cia = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.CIA_C);
t_cia = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.CIA_C_ZJ);
t_cia.setVisible(false);
mapView.addLayer(t_cia);
mapType = "VEC";
......
......@@ -31,7 +31,31 @@ public enum TianDiTuLayerTypes implements BaseTiledMapServiceType {
/**
* 地形注记
*/
CTA_C;
CTA_C,
/**
* 浙江矢量地图
*/
VEC_C_ZJ,
/**
* 浙江矢量地图注记
*/
CVA_C_ZJ,
/**
* 浙江影像地图
*/
IMG_C_ZJ,
/**
* 浙江影像注记
*/
CIA_C_ZJ,
/**
* 江苏矢量地图
*/
VEC_C_JS,
/**
* 江苏矢量地图注记
*/
CVA_C_JS;
public void setName()
{
......
......@@ -196,6 +196,30 @@ public class TianDiTuTiledMapServiceLayer extends TiledServiceLayer {
case CTA_C:
url.append(".tianditu.com/DataServer?T=cta_c&X=").append(col).append("&Y=").append(row).append("&L=").append(level);
break;
case VEC_C_ZJ:
url = new StringBuilder("http://srv.zjditu.cn/ZJEMAP_2D/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=ZJEMAP&FORMAT=image/png&TILEMATRIXSET=TileMatrixSet0&STYLE=default&TILEMATRIX=");
url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col);
break;
case CVA_C_ZJ:
url = new StringBuilder("http://srv3.zjditu.cn/ZJEMAPANNO_2D/wmts?layer=TDT_ZJEMAPANNO&style=default&tilematrixset=default028mm&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=");
url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col);
break;
case IMG_C_ZJ:
url = new StringBuilder("http://srv2.zjditu.cn/ZJDOM_2D/wmts?layer=imgmap&style=default&tilematrixset=default028mm&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=");
url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col);
break;
case CIA_C_ZJ:
url = new StringBuilder("http://srv3.zjditu.cn/ZJDOMANNO_2D/wmts?layer=TDT_ZJIMGANNO&style=default&tilematrixset=default028mm&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image/png&TileMatrix=");
url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col);
break;
case VEC_C_JS:
url = new StringBuilder("http://58.213.29.198/serviceaccess/wmts/JSMap7_14?service=WMTS&request=GetTile&version=1.0.0&tileSize=256&layer=0&style=default&tilematrixSet=JSMap7_14&format=Image/png&height=256&width=256&maptype=js_vec&tilematrix=");
url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col);
break;
case CVA_C_JS:
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;
default:
return null;
}
......
......@@ -20,7 +20,7 @@ public class AppInfo {
public static SQLiteDatabase mapcachedb;
// 天安门广场
public static Point initPoint = new Point(116.391478, 39.903177);
public static Point initPoint = new Point(118.778644, 32.05212);
public static double initRes = TDTTileinfo.getRes4490()[17];
// public static double initRes = TDTTileinfo.getRes4326()[6];
......
......@@ -9,7 +9,8 @@
<com.esri.android.map.MapView
android:id="@+id/map"
android:layout_width="fill_parent"
android:layout_height="fill_parent"></com.esri.android.map.MapView>
android:layout_height="fill_parent">
</com.esri.android.map.MapView>
<android.support.v7.widget.LinearLayoutCompat
android:layout_width="match_parent"
......
......@@ -43,6 +43,8 @@
android:layout_marginTop="0dp"
android:layout_marginLeft="0dp"
app:srcCompat="@mipmap/ic_my_location_white_48dp" />
</android.support.v7.widget.LinearLayoutCompat>
</android.support.constraint.ConstraintLayout>
......