diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-17 19:54:33 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-06-17 19:54:33 +1200 |
commit | 1a4dbe41223f253d649fba8b506b70c7a447a1ff (patch) | |
tree | 840301185bb1adfef285d487dc68043adfddca68 /web/app/view | |
parent | 31153730de44a31b87c8131d95de1127d2758508 (diff) | |
download | trackermap-server-1a4dbe41223f253d649fba8b506b70c7a447a1ff.tar.gz trackermap-server-1a4dbe41223f253d649fba8b506b70c7a447a1ff.tar.bz2 trackermap-server-1a4dbe41223f253d649fba8b506b70c7a447a1ff.zip |
Apply custom marker style
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/map/MapController.js | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/web/app/view/map/MapController.js b/web/app/view/map/MapController.js index 5cde39494..b0ab0bb58 100644 --- a/web/app/view/map/MapController.js +++ b/web/app/view/map/MapController.js @@ -55,9 +55,20 @@ Ext.define('Traccar.view.map.MapController', { this.liveData[data[i].deviceId].setGeometry(geometry); } else { var marker = new ol.Feature({ - geometry: geometry, - style: this.getLineStyle(styles.map_live_marker) + geometry: geometry }); + marker.setStyle(new ol.style.Style({ + image: new ol.style.Circle({ + radius: 40, + fill: new ol.style.Fill({ + color: 'rgba(150,150,200,0.6)' + }), + stroke: new ol.style.Stroke({ + color: 'rgba(20,30,100,0.8)', + width: 3 + }) + }) + })); this.getView().vectorSource.addFeature(marker); this.liveData[data[i].deviceId] = marker; } @@ -73,12 +84,22 @@ Ext.define('Traccar.view.map.MapController', { getLineStyle: function(color) { return new ol.style.Style({ - fill: new ol.style.Fill({ + /*fill: new ol.style.Fill({ color: color }), stroke: new ol.style.Stroke({ color: color, width: styles.map_route_width + }),*/ + image: new ol.style.Circle({ + radius: 40, + fill: new ol.style.Fill({ + color: 'rgba(150,150,200,0.6)' + }), + stroke: new ol.style.Stroke({ + color: 'rgba(20,30,100,0.8)', + width: 3 + }) }) }); }, |