Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
蒋波涛
/
landsurvey
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
c8f3815f
authored
2018-04-03 20:13:02 +0800
by
chiangbt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新天地图山东及江苏
1 parent
60687c93
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
9 deletions
.idea/misc.xml
app/src/main/AndroidManifest.xml
app/src/main/java/com/pashanhoo/landsurvey/MainActivity.java
app/src/main/java/com/pashanhoo/landsurvey/layers/tianditu/TianDiTuLayerTypes.java
app/src/main/java/com/pashanhoo/landsurvey/layers/tianditu/TianDiTuTiledMapServiceLayer.java
app/src/main/java/com/pashanhoo/landsurvey/utils/AppInfo.java
.idea/misc.xml
View file @
c8f3815
...
...
@@ -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"
>
...
...
app/src/main/AndroidManifest.xml
View file @
c8f3815
...
...
@@ -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>
...
...
app/src/main/java/com/pashanhoo/landsurvey/MainActivity.java
View file @
c8f3815
...
...
@@ -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
.
C
VA_C
);
t_cva
=
new
TianDiTuTiledMapServiceLayer
(
TianDiTuLayerTypes
.
C
IA_C_SD
);
mapView
.
addLayer
(
t_cva
);
// 一个本地sqlite数据库,注意其只有8-9级数据,因此在数据层中予以了显示控制
t_local
=
new
TianDiTuLocalTiledMapServiceLayer
(
"my.db"
,
"IMG_C"
);
...
...
app/src/main/java/com/pashanhoo/landsurvey/layers/tianditu/TianDiTuLayerTypes.java
View file @
c8f3815
...
...
@@ -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
()
{
...
...
app/src/main/java/com/pashanhoo/landsurvey/layers/tianditu/TianDiTuTiledMapServiceLayer.java
View file @
c8f3815
...
...
@@ -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
);
...
...
app/src/main/java/com/pashanhoo/landsurvey/utils/AppInfo.java
View file @
c8f3815
...
...
@@ -20,7 +20,7 @@ public class AppInfo {
public
static
SQLiteDatabase
mapcachedb
;
// 天安门广场
public
static
Point
initPoint
=
new
Point
(
11
8.778644
,
32.05212
);
public
static
Point
initPoint
=
new
Point
(
11
7.021129
,
36.669591
);
public
static
double
initRes
=
TDTTileinfo
.
getRes4490
()[
17
];
// public static double initRes = TDTTileinfo.getRes4326()[6];
...
...
Please
register
or
sign in
to post a comment