aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-07-15 22:14:00 +1200
committerGitHub <noreply@github.com>2016-07-15 22:14:00 +1200
commit8027b63bb13a91591677e335b68417c3f5378a88 (patch)
tree0fb4178f4e892c0005fade85c4cee01275334225 /web
parent2db5a3df91a76776cc214eca1e1fda6aecd0f36d (diff)
parent1f411961db56f7024d3e88cfaef89f1ab26fc9f1 (diff)
downloadtraccar-server-8027b63bb13a91591677e335b68417c3f5378a88.tar.gz
traccar-server-8027b63bb13a91591677e335b68417c3f5378a88.tar.bz2
traccar-server-8027b63bb13a91591677e335b68417c3f5378a88.zip
Merge pull request #2115 from Abyss777/master
Fix geofences not showed in old browsers and IE
Diffstat (limited to 'web')
-rw-r--r--web/app/GeofenceConverter.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/app/GeofenceConverter.js b/web/app/GeofenceConverter.js
index ebe121385..339f09615 100644
--- a/web/app/GeofenceConverter.js
+++ b/web/app/GeofenceConverter.js
@@ -20,7 +20,7 @@ Ext.define('Traccar.GeofenceConverter', {
wktToGeometry: function (mapView, wkt) {
var geometry, projection, resolutionAtEquator, pointResolution, resolutionFactor, points = [], center, radius,
content, i, lat, lon, coordinates;
- if (wkt.startsWith('POLYGON')) {
+ if (wkt.lastIndexOf('POLYGON', 0) === 0) {
content = wkt.match(/\([^\(\)]+\)/);
if (content !== null) {
coordinates = content[0].match(/-?\d+\.?\d*/g);
@@ -34,7 +34,7 @@ Ext.define('Traccar.GeofenceConverter', {
geometry = new ol.geom.Polygon([points]);
}
}
- } else if (wkt.startsWith('CIRCLE')) {
+ } else if (wkt.lastIndexOf('CIRCLE', 0) === 0) {
content = wkt.match(/\([^\(\)]+\)/);
if (content !== null) {
coordinates = content[0].match(/-?\d+\.?\d*/g);