From dbd7cb8ca62dd7fbc62fbfb9ccc16fc4b8a08d64 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Tue, 8 Nov 2016 16:01:59 +0500 Subject: Changed icon styles --- web/app/view/MapController.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'web/app/view') diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js index 829a8ea..2f72e81 100644 --- a/web/app/view/MapController.js +++ b/web/app/view/MapController.js @@ -309,14 +309,17 @@ Ext.define('Traccar.view.MapController', { }, resizeMarker: function (style, zoom) { - var newStyle = new ol.style.Style({ - image: Traccar.DeviceImages.getImageIcon(style.getImage().fill, - zoom, - style.getImage().angle, - style.getImage().category), - text: style.getText() + var image, text; + image = Traccar.DeviceImages.getImageIcon(style.getImage().fill, + zoom, + style.getImage().angle, + style.getImage().category); + text = style.getText(); + text.setOffsetY(- image.getSize()[1] / 2 - Traccar.Style.mapTextOffset); + return newStyle = new ol.style.Style({ + image: image, + text: text }); - return newStyle; }, rotateMarker: function (style, angle) { -- cgit v1.2.3