@@ -28,8 +28,8 @@ module.exports = class Image {
28
28
this . popupUI = null ;
29
29
this . imgMapGPS = null ;
30
30
31
- if ( ! this . conf . GPS_Coord ) {
32
- this . conf . GPS_Coord = { } ;
31
+ if ( ! this . conf . gpsCoord ) {
32
+ this . conf . gpsCoord = { } ;
33
33
}
34
34
}
35
35
@@ -73,7 +73,7 @@ module.exports = class Image {
73
73
if ( this . imgMapGPS ) {
74
74
this . imgMapGPS . remove ( ) ;
75
75
}
76
- if ( ! this . conf . GPS_Coord . checked ) return false ;
76
+ if ( ! this . conf . gpsCoord . checked ) return false ;
77
77
const mapImg = document . createElement ( 'img' ) ;
78
78
const _this = this ;
79
79
mapImg . addEventListener ( 'load' , function ( ) {
@@ -199,8 +199,8 @@ module.exports = class Image {
199
199
}
200
200
201
201
createCanvasDrawed ( img , ratioX = null , ratioY = null ) {
202
- const lat = this . conf . GPS_Coord . Lat || 0 ;
203
- const lng = this . conf . GPS_Coord . Lng || 0 ;
202
+ const lat = this . conf . gpsCoord . lat || 0 ;
203
+ const lng = this . conf . gpsCoord . lng || 0 ;
204
204
205
205
ratioX = ratioX || ( lng - leftIP ) / ( rightIP - leftIP ) ;
206
206
ratioY = ratioY || 1 - ( lat - bottomIP ) / ( topIP - bottomIP ) ;
@@ -227,11 +227,11 @@ module.exports = class Image {
227
227
}
228
228
229
229
ratioToCoordinates ( ratioX , ratioY ) {
230
- const Lng = leftIP + ratioX * ( rightIP - leftIP ) ;
231
- const Lat = bottomIP + ratioY * ( topIP - bottomIP ) ;
230
+ const lng = leftIP + ratioX * ( rightIP - leftIP ) ;
231
+ const lat = bottomIP + ratioY * ( topIP - bottomIP ) ;
232
232
return {
233
- Lng : Lng ,
234
- Lat : Lat ,
233
+ lng : lng ,
234
+ lat : lat ,
235
235
} ;
236
236
}
237
237
0 commit comments