File tree Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Expand file tree Collapse file tree 2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 26
26
flex : 1 ;
27
27
}
28
28
29
- .fullscreen {
29
+ .map-ctn {
30
+ height :100% ;
31
+ }
32
+
33
+ .fullscreen-btn {
30
34
position : absolute ;
31
35
z-index : 1 ;
32
36
color : #e6e6e6 ;
78
82
display : block ;
79
83
}
80
84
}
85
+ .fullscreen {
86
+ position : fixed ;
87
+ top :0 ;
88
+ left :0 ;
89
+ right :0 ;
90
+ bottom :0 ;
91
+ }
81
92
</style >
82
93
<script type =" text/javascript " src =" https://webapi.amap.com/maps?v=1.4.15&key=05fb23d2c6d3ce6323793cd981030e9f&plugin=AMap.Geocoder " ></script >
83
94
<script src =" /resource/2018/exif.js " ></script >
84
95
<script src =" /resource/2021/gpsConvert.js " ></script >
85
96
86
97
<div class =" gps-container " >
87
98
<h2 >把图片拖进来</h2 >
88
- <div class =" container " id =" mapCtn " >
89
- <div class="fullscreen">全屏</div>
99
+ <div class =" container " >
100
+ <div class="map-ctn" id="mapCtn">
101
+ <div class="fullscreen-btn">全屏</div>
102
+ </div>
90
103
</div >
91
104
<div id =" makeAndModel " style =" height : 30px ; " ></div >
92
105
<footer >
Original file line number Diff line number Diff line change @@ -15,11 +15,13 @@ function gps2Google(gpsCoord) {
15
15
var pageControl = {
16
16
init : function ( ) {
17
17
const mapContainer = $ ( "#mapCtn" ) ;
18
- const fullBtn = $ ( ".fullscreen" ) ;
18
+ const fullBtn = $ ( ".fullscreen-btn " ) ;
19
19
const btnAmapTile = $ ( "#btnAmapTile" ) ;
20
20
const btnGoogleTile = $ ( "#btnGoogleTile" ) ;
21
21
22
22
fullBtn . addEventListener ( "click" , ( ) => {
23
+ $ ( ".container" ) . classList . toggle ( "fullscreen" ) ;
24
+ return ;
23
25
if ( document . fullscreenElement ) {
24
26
document . exitFullscreen ( ) ;
25
27
return ;
@@ -36,7 +38,7 @@ var pageControl = {
36
38
"http://mt2.google.com/vt/lyrs=y&hl=zh-CN&gl=cn&x=[x]&y=[y]&z=[z]&s=Galil" ,
37
39
zIndex : 3 ,
38
40
} ) ;
39
- this . googleLayer = googleLayer ;
41
+ this . googleLayer = googleLayer ;
40
42
41
43
const amapSatelliteLayer = new AMap . TileLayer . Satellite ( ) ;
42
44
const amapRoadNetLayer = new AMap . TileLayer . RoadNet ( ) ;
@@ -45,7 +47,6 @@ var pageControl = {
45
47
resizeEnable : true ,
46
48
zoom : 15 ,
47
49
center : [ 116.397428 , 39.90923 ] ,
48
-
49
50
} ) ;
50
51
51
52
const testGoogleImage = new Image ( ) ;
You can’t perform that action at this time.
0 commit comments