aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-01-13 06:27:31 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-01-13 05:27:31 +1300
commit4d092d96d6d872096abaf2f9883d2b578c5c8f72 (patch)
tree7df9693570493c46ebf994199093b8b05fed3cfc /web/app/view/MapController.js
parentede04a679525bb95fcc5ca0a327e8e915f58564e (diff)
downloadtrackermap-web-4d092d96d6d872096abaf2f9883d2b578c5c8f72.tar.gz
trackermap-web-4d092d96d6d872096abaf2f9883d2b578c5c8f72.tar.bz2
trackermap-web-4d092d96d6d872096abaf2f9883d2b578c5c8f72.zip
Show accuracy circle on the map
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 66d6809a..43d86d97 100644
--- a/web/app/view/MapController.js
+++ b/web/app/view/MapController.js
@@ -86,44 +86,12 @@ 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
- })
- });
- },
-
showGeofences: function () {
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;