aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-10-31 13:19:13 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-10-31 13:19:13 -0700
commit5395dc657dc9f9d6d53b09b2bf69d6492d39cf1b (patch)
tree34a4c8d1c38b53945bed742bcef39c5b33213eae /web/app
parent1e2e8d9bea0560d3ea75b40ca5cd7ab0bb5f4afd (diff)
downloadtrackermap-web-5395dc657dc9f9d6d53b09b2bf69d6492d39cf1b.tar.gz
trackermap-web-5395dc657dc9f9d6d53b09b2bf69d6492d39cf1b.tar.bz2
trackermap-web-5395dc657dc9f9d6d53b09b2bf69d6492d39cf1b.zip
Fix lint issues
Diffstat (limited to 'web/app')
-rw-r--r--web/app/view/map/GeofenceMapController.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/app/view/map/GeofenceMapController.js b/web/app/view/map/GeofenceMapController.js
index 5274bc39..237858ad 100644
--- a/web/app/view/map/GeofenceMapController.js
+++ b/web/app/view/map/GeofenceMapController.js
@@ -34,15 +34,16 @@ Ext.define('Traccar.view.map.GeofenceMapController', {
},
onFileChange: function (fileField) {
- var reader, parser, xml, segment, point, projection, points = [], view = this.getView();
+ var reader, parser, xml, segment, projection, points = [], view = this.getView();
if (fileField.fileInputEl.dom.files.length > 0) {
reader = new FileReader();
- reader.onload = function (event) {
+ reader.onload = function () {
parser = new DOMParser();
xml = parser.parseFromString(reader.result, 'text/xml');
segment = xml.getElementsByTagName('trkseg')[0];
projection = view.mapView.getProjection();
Array.from(segment.getElementsByTagName('trkpt')).forEach(function (point) {
+ var lat, lon;
lat = Number(point.getAttribute('lat'));
lon = Number(point.getAttribute('lon'));
points.push(ol.proj.transform([lon, lat], 'EPSG:4326', projection));