From 1b8b172eaaab2aa738f45e39e3ca86a42d494bdd Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Thu, 29 Dec 2016 14:02:35 +0500 Subject: Add support for geofence colors --- web/app/view/GeofenceMap.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'web/app/view/GeofenceMap.js') diff --git a/web/app/view/GeofenceMap.js b/web/app/view/GeofenceMap.js index ad21f70..0a56b33 100644 --- a/web/app/view/GeofenceMap.js +++ b/web/app/view/GeofenceMap.js @@ -59,7 +59,7 @@ Ext.define('Traccar.view.GeofenceMap', { }, initMap: function () { - var map, featureOverlay, geometry; + var map, featureOverlay, geometry, fillColor; this.callParent(); map = this.map; @@ -74,13 +74,15 @@ Ext.define('Traccar.view.GeofenceMap', { this.mapView.setCenter(geometry.getCoordinates()[0][0]); } } + fillColor = ol.color.asArray(Traccar.Style.mapGeofenceColor); + fillColor[3] = Traccar.Style.mapGeofenceOverlayOpacity; featureOverlay = new ol.layer.Vector({ source: new ol.source.Vector({ features: this.features }), style: new ol.style.Style({ fill: new ol.style.Fill({ - color: Traccar.Style.mapGeofenceOverlay + color: fillColor }), stroke: new ol.style.Stroke({ color: Traccar.Style.mapGeofenceColor, -- cgit v1.2.3