aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapController.js
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-01-16 17:14:08 +0500
committerAbyss777 <abyss@fox5.ru>2017-01-16 17:14:08 +0500
commitf14608fb8a198ed6ac91df10e5dc976263dcee93 (patch)
treeec74e74a22deecdffa1b09e199632a9e04ae11b6 /web/app/view/MapController.js
parent34c878d014a065981d56859cb73564bfa2bc478e (diff)
parent4d092d96d6d872096abaf2f9883d2b578c5c8f72 (diff)
downloadtrackermap-web-f14608fb8a198ed6ac91df10e5dc976263dcee93.tar.gz
trackermap-web-f14608fb8a198ed6ac91df10e5dc976263dcee93.tar.bz2
trackermap-web-f14608fb8a198ed6ac91df10e5dc976263dcee93.zip
Merge branch 'master' into manager
# Conflicts: # web/app/view/MapController.js
Diffstat (limited to 'web/app/view/MapController.js')
-rw-r--r--web/app/view/MapController.js34
1 files changed, 1 insertions, 33 deletions
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js
index a9edee95..95296f14 100644
--- a/web/app/view/MapController.js
+++ b/web/app/view/MapController.js
@@ -86,45 +86,13 @@ Ext.define('Traccar.view.MapController', {
this.fireEvent('togglestate', state);
},
- getGeofenceStyle: function (label, color) {
- var fillColor, strokeColor;
- if (color) {
- fillColor = ol.color.asArray(color);
- strokeColor = color;
- } else {
- fillColor = ol.color.asArray(Traccar.Style.mapGeofenceColor);
- strokeColor = Traccar.Style.mapGeofenceColor;
- }
- fillColor[3] = Traccar.Style.mapGeofenceOverlayOpacity;
- return new ol.style.Style({
- fill: new ol.style.Fill({
- color: fillColor
- }),
- stroke: new ol.style.Stroke({
- color: strokeColor,
- width: Traccar.Style.mapGeofenceWidth
- }),
- text: new ol.style.Text({
- text: label,
- fill: new ol.style.Fill({
- color: Traccar.Style.mapGeofenceTextColor
- }),
- stroke: new ol.style.Stroke({
- color: Traccar.Style.mapTextStrokeColor,
- width: Traccar.Style.mapTextStrokeWidth
- }),
- font : Traccar.Style.mapTextFont
- })
- });
- },
-
updateGeofences: function () {
this.getView().getGeofencesSource().clear();
if (this.lookupReference('showGeofencesButton').pressed) {
Ext.getStore('Geofences').each(function (geofence) {
var feature = new ol.Feature(Traccar.GeofenceConverter
.wktToGeometry(this.getView().getMapView(), geofence.get('area')));
- feature.setStyle(this.getGeofenceStyle(geofence.get('name'),
+ feature.setStyle(this.getAreaStyle(geofence.get('name'),
geofence.get('attributes') ? geofence.get('attributes').color : null));
this.getView().getGeofencesSource().addFeature(feature);
return true;