更新高德地图的问题
Showing
9 changed files
with
58 additions
and
6 deletions
| ... | @@ -24,7 +24,7 @@ | ... | @@ -24,7 +24,7 @@ |
| 24 | </value> | 24 | </value> |
| 25 | </option> | 25 | </option> |
| 26 | </component> | 26 | </component> |
| 27 | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | 27 | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> |
| 28 | <output url="file://$PROJECT_DIR$/build/classes" /> | 28 | <output url="file://$PROJECT_DIR$/build/classes" /> |
| 29 | </component> | 29 | </component> |
| 30 | <component name="ProjectType"> | 30 | <component name="ProjectType"> | ... | ... |
| ... | @@ -24,6 +24,7 @@ | ... | @@ -24,6 +24,7 @@ |
| 24 | android:label="@string/app_name" | 24 | android:label="@string/app_name" |
| 25 | android:screenOrientation="landscape" | 25 | android:screenOrientation="landscape" |
| 26 | android:theme="@style/AppTheme.NoActionBar"> <!-- 禁止屏幕旋转 --> | 26 | android:theme="@style/AppTheme.NoActionBar"> <!-- 禁止屏幕旋转 --> |
| 27 | |||
| 27 | </activity> | 28 | </activity> |
| 28 | <activity android:name=".GoogleMapActivity"> | 29 | <activity android:name=".GoogleMapActivity"> |
| 29 | <intent-filter> | 30 | <intent-filter> | ... | ... |
| ... | @@ -167,10 +167,10 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -167,10 +167,10 @@ public class MainActivity extends AppCompatActivity { |
| 167 | t_local = new TianDiTuLocalTiledMapServiceLayer("my.db", "IMG_C"); | 167 | t_local = new TianDiTuLocalTiledMapServiceLayer("my.db", "IMG_C"); |
| 168 | mapView.addLayer(t_local); | 168 | mapView.addLayer(t_local); |
| 169 | // 添加地图图层 | 169 | // 添加地图图层 |
| 170 | t_img = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.IMG_C); | 170 | t_img = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.IMG_C_ZJ); |
| 171 | t_img.setVisible(false); | 171 | t_img.setVisible(false); |
| 172 | mapView.addLayer(t_img); | 172 | mapView.addLayer(t_img); |
| 173 | t_cia = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.CIA_C); | 173 | t_cia = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.CIA_C_ZJ); |
| 174 | t_cia.setVisible(false); | 174 | t_cia.setVisible(false); |
| 175 | mapView.addLayer(t_cia); | 175 | mapView.addLayer(t_cia); |
| 176 | mapType = "VEC"; | 176 | mapType = "VEC"; | ... | ... |
| ... | @@ -31,7 +31,31 @@ public enum TianDiTuLayerTypes implements BaseTiledMapServiceType { | ... | @@ -31,7 +31,31 @@ public enum TianDiTuLayerTypes implements BaseTiledMapServiceType { |
| 31 | /** | 31 | /** |
| 32 | * 地形注记 | 32 | * 地形注记 |
| 33 | */ | 33 | */ |
| 34 | CTA_C; | 34 | CTA_C, |
| 35 | /** | ||
| 36 | * 浙江矢量地图 | ||
| 37 | */ | ||
| 38 | VEC_C_ZJ, | ||
| 39 | /** | ||
| 40 | * 浙江矢量地图注记 | ||
| 41 | */ | ||
| 42 | CVA_C_ZJ, | ||
| 43 | /** | ||
| 44 | * 浙江影像地图 | ||
| 45 | */ | ||
| 46 | IMG_C_ZJ, | ||
| 47 | /** | ||
| 48 | * 浙江影像注记 | ||
| 49 | */ | ||
| 50 | CIA_C_ZJ, | ||
| 51 | /** | ||
| 52 | * 江苏矢量地图 | ||
| 53 | */ | ||
| 54 | VEC_C_JS, | ||
| 55 | /** | ||
| 56 | * 江苏矢量地图注记 | ||
| 57 | */ | ||
| 58 | CVA_C_JS; | ||
| 35 | 59 | ||
| 36 | public void setName() | 60 | public void setName() |
| 37 | { | 61 | { | ... | ... |
| ... | @@ -196,6 +196,30 @@ public class TianDiTuTiledMapServiceLayer extends TiledServiceLayer { | ... | @@ -196,6 +196,30 @@ public class TianDiTuTiledMapServiceLayer extends TiledServiceLayer { |
| 196 | case CTA_C: | 196 | case CTA_C: |
| 197 | url.append(".tianditu.com/DataServer?T=cta_c&X=").append(col).append("&Y=").append(row).append("&L=").append(level); | 197 | url.append(".tianditu.com/DataServer?T=cta_c&X=").append(col).append("&Y=").append(row).append("&L=").append(level); |
| 198 | break; | 198 | break; |
| 199 | case VEC_C_ZJ: | ||
| 200 | 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="); | ||
| 201 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); | ||
| 202 | break; | ||
| 203 | case CVA_C_ZJ: | ||
| 204 | 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="); | ||
| 205 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); | ||
| 206 | break; | ||
| 207 | case IMG_C_ZJ: | ||
| 208 | 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="); | ||
| 209 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); | ||
| 210 | break; | ||
| 211 | case CIA_C_ZJ: | ||
| 212 | 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="); | ||
| 213 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); | ||
| 214 | break; | ||
| 215 | case VEC_C_JS: | ||
| 216 | 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="); | ||
| 217 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); | ||
| 218 | break; | ||
| 219 | case CVA_C_JS: | ||
| 220 | 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="); | ||
| 221 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); | ||
| 222 | break; | ||
| 199 | default: | 223 | default: |
| 200 | return null; | 224 | return null; |
| 201 | } | 225 | } | ... | ... |
| ... | @@ -20,7 +20,7 @@ public class AppInfo { | ... | @@ -20,7 +20,7 @@ public class AppInfo { |
| 20 | public static SQLiteDatabase mapcachedb; | 20 | public static SQLiteDatabase mapcachedb; |
| 21 | 21 | ||
| 22 | // 天安门广场 | 22 | // 天安门广场 |
| 23 | public static Point initPoint = new Point(116.391478, 39.903177); | 23 | public static Point initPoint = new Point(118.778644, 32.05212); |
| 24 | 24 | ||
| 25 | public static double initRes = TDTTileinfo.getRes4490()[17]; | 25 | public static double initRes = TDTTileinfo.getRes4490()[17]; |
| 26 | // public static double initRes = TDTTileinfo.getRes4326()[6]; | 26 | // public static double initRes = TDTTileinfo.getRes4326()[6]; | ... | ... |
app/src/main/res/drawable/epsg_target.png
0 → 100755
1.2 KB
| ... | @@ -9,7 +9,8 @@ | ... | @@ -9,7 +9,8 @@ |
| 9 | <com.esri.android.map.MapView | 9 | <com.esri.android.map.MapView |
| 10 | android:id="@+id/map" | 10 | android:id="@+id/map" |
| 11 | android:layout_width="fill_parent" | 11 | android:layout_width="fill_parent" |
| 12 | android:layout_height="fill_parent"></com.esri.android.map.MapView> | 12 | android:layout_height="fill_parent"> |
| 13 | </com.esri.android.map.MapView> | ||
| 13 | 14 | ||
| 14 | <android.support.v7.widget.LinearLayoutCompat | 15 | <android.support.v7.widget.LinearLayoutCompat |
| 15 | android:layout_width="match_parent" | 16 | android:layout_width="match_parent" | ... | ... |
| ... | @@ -43,6 +43,8 @@ | ... | @@ -43,6 +43,8 @@ |
| 43 | android:layout_marginTop="0dp" | 43 | android:layout_marginTop="0dp" |
| 44 | android:layout_marginLeft="0dp" | 44 | android:layout_marginLeft="0dp" |
| 45 | app:srcCompat="@mipmap/ic_my_location_white_48dp" /> | 45 | app:srcCompat="@mipmap/ic_my_location_white_48dp" /> |
| 46 | |||
| 46 | </android.support.v7.widget.LinearLayoutCompat> | 47 | </android.support.v7.widget.LinearLayoutCompat> |
| 47 | 48 | ||
| 49 | |||
| 48 | </android.support.constraint.ConstraintLayout> | 50 | </android.support.constraint.ConstraintLayout> | ... | ... |
-
Please register or sign in to post a comment