aboutsummaryrefslogtreecommitdiff
path: root/web/app/view/MapController.js
diff options
context:
space:
mode:
Diffstat (limited to 'web/app/view/MapController.js')
-rw-r--r--web/app/view/MapController.js17
1 files changed, 10 insertions, 7 deletions
diff --git a/web/app/view/MapController.js b/web/app/view/MapController.js
index 829a8ea5..2f72e81c 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) {