@@ -34,12 +34,22 @@ var pageControl = {
34
34
"http://mt2.google.cn/vt/lyrs=y&hl=zh-CN&gl=cn&x=[x]&y=[y]&z=[z]&s=Galil" ,
35
35
zIndex : 3 ,
36
36
} ) ;
37
+
38
+ const amapSatelliteLayer = new AMap . TileLayer . Satellite ( ) ;
39
+ const amapRoadNetLayer = new AMap . TileLayer . RoadNet ( ) ;
40
+
37
41
const map = new AMap . Map ( mapContainer , {
38
42
resizeEnable : true ,
39
43
zoom : 15 ,
40
44
center : [ 116.397428 , 39.90923 ] ,
41
- layers : [ googleLayer ] ,
45
+ layers : [ amapSatelliteLayer , amapRoadNetLayer ] ,
42
46
} ) ;
47
+
48
+ const testGoogleImage = new Image ( ) ;
49
+ testGoogleImage . src = `//mt2.google.cn/vt/lyrs=y&hl=zh-CN&gl=cn&x=17294&y=15469&z=15&s=Galil?t=${ + Math . random ( ) } ` ;
50
+ testGoogleImage . onload = ( ) => {
51
+ map . setLayers ( [ googleLayer ] ) ;
52
+ } ;
43
53
/* var marker = new AMap.Marker({
44
54
position: new AMap.LngLat(116.397428, 39.90923), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
45
55
title: "北京",
@@ -107,7 +117,7 @@ var pageControl = {
107
117
} )
108
118
) ;
109
119
}
110
-
120
+
111
121
return markers ;
112
122
} ,
113
123
getFiles : function ( fileList ) {
@@ -216,9 +226,8 @@ var pageControl = {
216
226
gps2Google ( GPSLongitude )
217
227
) } ${ GPSLongitudeRef } `;
218
228
this . dumpDetail ( "gps坐标" , `${ lon } ,${ lat } ` , googleUrl ) ;
219
- } else {
220
- this . dumpDetail ( "gps坐标" , '无GPS坐标,统一显示在天安门' ) ;
221
-
229
+ } else {
230
+ this . dumpDetail ( "gps坐标" , "无GPS坐标,统一显示在天安门" ) ;
222
231
}
223
232
224
233
var detailFields = {
0 commit comments