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
60687c93
authored
2018-04-03 16:32:16 +0800
by
chiangbt
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
更新高德地图的问题
1 parent
09cac9d1
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
58 additions
and
6 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
app/src/main/res/drawable/epsg_target.png
app/src/main/res/layout/activity_baidu_map.xml
app/src/main/res/layout/activity_google_map.xml
.idea/misc.xml
View file @
60687c9
...
...
@@ -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"
>
...
...
app/src/main/AndroidManifest.xml
View file @
60687c9
...
...
@@ -24,6 +24,7 @@
android:label=
"@string/app_name"
android:screenOrientation=
"landscape"
android:theme=
"@style/AppTheme.NoActionBar"
>
<!-- 禁止屏幕旋转 -->
</activity>
<activity
android:name=
".GoogleMapActivity"
>
<intent-filter>
...
...
app/src/main/java/com/pashanhoo/landsurvey/MainActivity.java
View file @
60687c9
...
...
@@ -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"
;
...
...
app/src/main/java/com/pashanhoo/landsurvey/layers/tianditu/TianDiTuLayerTypes.java
View file @
60687c9
...
...
@@ -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
()
{
...
...
app/src/main/java/com/pashanhoo/landsurvey/layers/tianditu/TianDiTuTiledMapServiceLayer.java
View file @
60687c9
...
...
@@ -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
;
}
...
...
app/src/main/java/com/pashanhoo/landsurvey/utils/AppInfo.java
View file @
60687c9
...
...
@@ -20,7 +20,7 @@ public class AppInfo {
public
static
SQLiteDatabase
mapcachedb
;
// 天安门广场
public
static
Point
initPoint
=
new
Point
(
11
6.391478
,
39.903177
);
public
static
Point
initPoint
=
new
Point
(
11
8.778644
,
32.05212
);
public
static
double
initRes
=
TDTTileinfo
.
getRes4490
()[
17
];
// public static double initRes = TDTTileinfo.getRes4326()[6];
...
...
app/src/main/res/drawable/epsg_target.png
0 → 100755
View file @
60687c9
1.2 KB
app/src/main/res/layout/activity_baidu_map.xml
View file @
60687c9
...
...
@@ -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"
...
...
app/src/main/res/layout/activity_google_map.xml
View file @
60687c9
...
...
@@ -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>
...
...
Please
register
or
sign in
to post a comment