diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-10-31 13:19:13 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-10-31 13:19:13 -0700 |
commit | 5395dc657dc9f9d6d53b09b2bf69d6492d39cf1b (patch) | |
tree | 34a4c8d1c38b53945bed742bcef39c5b33213eae /web | |
parent | 1e2e8d9bea0560d3ea75b40ca5cd7ab0bb5f4afd (diff) | |
download | etbsa-traccar-web-5395dc657dc9f9d6d53b09b2bf69d6492d39cf1b.tar.gz etbsa-traccar-web-5395dc657dc9f9d6d53b09b2bf69d6492d39cf1b.tar.bz2 etbsa-traccar-web-5395dc657dc9f9d6d53b09b2bf69d6492d39cf1b.zip |
Fix lint issues
Diffstat (limited to 'web')
-rw-r--r-- | web/app/view/map/GeofenceMapController.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/web/app/view/map/GeofenceMapController.js b/web/app/view/map/GeofenceMapController.js index 5274bc3..237858a 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)); |