diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-12-29 22:37:47 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-29 22:37:47 +1300 |
commit | 3362bc6315a7711b40649ee3a07fbfc8b0ff4ef8 (patch) | |
tree | 3156cbf7fd36a77badcdd7cd9a6cebbdf22f366d /web/app/view/GeofenceMap.js | |
parent | 4b83eba6511c6333a3cefaef59055db7e7764e3d (diff) | |
parent | 9099fd92f984b26090072f6553dff55b713589d7 (diff) | |
download | trackermap-web-3362bc6315a7711b40649ee3a07fbfc8b0ff4ef8.tar.gz trackermap-web-3362bc6315a7711b40649ee3a07fbfc8b0ff4ef8.tar.bz2 trackermap-web-3362bc6315a7711b40649ee3a07fbfc8b0ff4ef8.zip |
Merge pull request #376 from Abyss777/color_geofences
Add support for geofence colors
Diffstat (limited to 'web/app/view/GeofenceMap.js')
-rw-r--r-- | web/app/view/GeofenceMap.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/web/app/view/GeofenceMap.js b/web/app/view/GeofenceMap.js index ad21f70d..0a56b337 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, |