更新天地图山东及江苏
Showing
6 changed files
with
33 additions
and
9 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_8" project-jdk-name="1.8" project-jdk-type="JavaSDK"> | 27 | <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" 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,14 +24,14 @@ | ... | @@ -24,14 +24,14 @@ |
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 | |||
28 | </activity> | ||
29 | <activity android:name=".GoogleMapActivity"> | ||
30 | <intent-filter> | 27 | <intent-filter> |
31 | <action android:name="android.intent.action.MAIN" /> | 28 | <action android:name="android.intent.action.MAIN" /> |
32 | <category android:name="android.intent.category.LAUNCHER" /> | 29 | <category android:name="android.intent.category.LAUNCHER" /> |
33 | </intent-filter> | 30 | </intent-filter> |
34 | </activity> | 31 | </activity> |
32 | <activity android:name=".GoogleMapActivity"> | ||
33 | |||
34 | </activity> | ||
35 | <activity android:name=".BaiduMapActivity"> | 35 | <activity android:name=".BaiduMapActivity"> |
36 | 36 | ||
37 | </activity> | 37 | </activity> | ... | ... |
... | @@ -159,9 +159,9 @@ public class MainActivity extends AppCompatActivity { | ... | @@ -159,9 +159,9 @@ public class MainActivity extends AppCompatActivity { |
159 | }); | 159 | }); |
160 | 160 | ||
161 | // 添加地图图层 | 161 | // 添加地图图层 |
162 | t_vec = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.VEC_C); | 162 | t_vec = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.IMG_C_SD); |
163 | mapView.addLayer(t_vec); | 163 | mapView.addLayer(t_vec); |
164 | t_cva = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.CVA_C); | 164 | t_cva = new TianDiTuTiledMapServiceLayer(TianDiTuLayerTypes.CIA_C_SD); |
165 | mapView.addLayer(t_cva); | 165 | mapView.addLayer(t_cva); |
166 | // 一个本地sqlite数据库,注意其只有8-9级数据,因此在数据层中予以了显示控制 | 166 | // 一个本地sqlite数据库,注意其只有8-9级数据,因此在数据层中予以了显示控制 |
167 | t_local = new TianDiTuLocalTiledMapServiceLayer("my.db", "IMG_C"); | 167 | t_local = new TianDiTuLocalTiledMapServiceLayer("my.db", "IMG_C"); | ... | ... |
... | @@ -55,7 +55,19 @@ public enum TianDiTuLayerTypes implements BaseTiledMapServiceType { | ... | @@ -55,7 +55,19 @@ public enum TianDiTuLayerTypes implements BaseTiledMapServiceType { |
55 | /** | 55 | /** |
56 | * 江苏矢量地图注记 | 56 | * 江苏矢量地图注记 |
57 | */ | 57 | */ |
58 | CVA_C_JS; | 58 | CVA_C_JS, |
59 | /** | ||
60 | * 山东矢量地图(包含注记) | ||
61 | */ | ||
62 | VEC_C_SD, | ||
63 | /** | ||
64 | * 山东影像地图 | ||
65 | */ | ||
66 | IMG_C_SD, | ||
67 | /** | ||
68 | * 山东影像地图注记 | ||
69 | */ | ||
70 | CIA_C_SD; | ||
59 | 71 | ||
60 | public void setName() | 72 | public void setName() |
61 | { | 73 | { | ... | ... |
... | @@ -220,10 +220,22 @@ public class TianDiTuTiledMapServiceLayer extends TiledServiceLayer { | ... | @@ -220,10 +220,22 @@ public class TianDiTuTiledMapServiceLayer extends TiledServiceLayer { |
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="); | 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); | 221 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); |
222 | break; | 222 | break; |
223 | case VEC_C_SD: | ||
224 | 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="); | ||
225 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); | ||
226 | break; | ||
227 | case IMG_C_SD: | ||
228 | 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="); | ||
229 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); | ||
230 | break; | ||
231 | case CIA_C_SD: | ||
232 | 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="); | ||
233 | url.append(level).append("&TILEROW=").append(row).append("&TILECOL=").append(col); | ||
234 | break; | ||
223 | default: | 235 | default: |
224 | return null; | 236 | return null; |
225 | } | 237 | } |
226 | Log.i("map",url.toString()); | 238 | Log.i("map", url.toString()); |
227 | try { | 239 | try { |
228 | // 首先从离线数据库中读取 | 240 | // 首先从离线数据库中读取 |
229 | result = getOfflineCacheDB(level, col, row); | 241 | result = getOfflineCacheDB(level, col, row); | ... | ... |
... | @@ -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(118.778644, 32.05212); | 23 | public static Point initPoint = new Point(117.021129, 36.669591); |
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]; | ... | ... |
-
Please register or sign in to post a comment