@@ -13,7 +13,7 @@ class LocationGlobe {
13
13
this . parent = document . getElementById ( parentId ) ;
14
14
this . parent . innerHTML += `<div id="mod_globe">
15
15
<div id="mod_globe_innercontainer">
16
- <h1>WORLD VIEW<i class="mod_globe_location" >GLOBAL NETWORK MAP</i></h1>
16
+ <h1>WORLD VIEW<i>GLOBAL NETWORK MAP</i></h1>
17
17
<h2>ENDPOINT LAT/LON<i class="mod_globe_headerInfo">0.0000, 0.0000</i></h2>
18
18
<div id="mod_globe_canvas_placeholder"></div>
19
19
</div>
@@ -138,14 +138,13 @@ class LocationGlobe {
138
138
}
139
139
updateLoc ( ) {
140
140
try {
141
- let lang = window . settings . lang ;
142
- let geo = window . mods . netstat . ipinfo . geo ;
143
- let newgeo = geo . location ;
141
+ let newgeo = window . mods . netstat . ipinfo . geo . location ;
144
142
newgeo . latitude = Math . round ( newgeo . latitude * 10000 ) / 10000 ;
145
143
newgeo . longitude = Math . round ( newgeo . longitude * 10000 ) / 10000 ;
146
144
147
145
if ( newgeo . latitude !== this . lastgeo . latitude || newgeo . longitude !== this . lastgeo . longitude ) {
148
146
document . querySelector ( "i.mod_globe_headerInfo" ) . innerText = `${ newgeo . latitude } , ${ newgeo . longitude } ` ;
147
+
149
148
this . globe . pins . forEach ( pin => {
150
149
pin . remove ( ) ;
151
150
} ) ;
@@ -162,8 +161,6 @@ class LocationGlobe {
162
161
}
163
162
164
163
this . lastgeo = newgeo ;
165
- document . querySelector ( "i.mod_globe_location" ) . innerText = `${ geo . country . names [ lang ] } ` ;
166
- document . querySelector ( "i.mod_globe_location" ) . innerText += `,${ geo . city . names [ lang ] } `
167
164
} catch ( e ) {
168
165
document . querySelector ( "i.mod_globe_headerInfo" ) . innerText = "UNKNOWN" ;
169
166
}
0 commit comments