diff options
Diffstat (limited to 'web/app/GeofenceConverter.js')
-rw-r--r-- | web/app/GeofenceConverter.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/web/app/GeofenceConverter.js b/web/app/GeofenceConverter.js index 1f6ad377..688f2233 100644 --- a/web/app/GeofenceConverter.js +++ b/web/app/GeofenceConverter.js @@ -68,14 +68,14 @@ Ext.define('Traccar.GeofenceConverter', { }, geometryToWkt: function (projection, geometry) { - var result, i, center, radius, edgeCoordinate, earthSphere, groundRadius, points; + var result, i, center, radius, edgeCoordinate, groundRadius, points; if (geometry instanceof ol.geom.Circle) { center = geometry.getCenter(); radius = geometry.getRadius(); edgeCoordinate = [center[0] + radius, center[1]]; center = ol.proj.transform(center, projection, 'EPSG:4326'); groundRadius = ol.sphere.getDistance( - center, ol.proj.transform(edgeCoordinate, projection, 'EPSG:4326'), 6378137) + center, ol.proj.transform(edgeCoordinate, projection, 'EPSG:4326'), 6378137); result = 'CIRCLE ('; result += center[1] + ' ' + center[0] + ', '; result += groundRadius.toFixed(1) + ')'; |