aboutsummaryrefslogtreecommitdiff
path: root/web/app
diff options
context:
space:
mode:
Diffstat (limited to 'web/app')
-rw-r--r--web/app/view/Map.js18
1 files changed, 17 insertions, 1 deletions
diff --git a/web/app/view/Map.js b/web/app/view/Map.js
index 849f678a7..3be450cf4 100644
--- a/web/app/view/Map.js
+++ b/web/app/view/Map.js
@@ -41,7 +41,7 @@ Ext.define('Traccar.view.Map', {
listeners: {
afterrender: function () {
- var user, server, layer, type, bingKey, vectorLayer, lat, lon, zoom;
+ var user, server, layer, type, bingKey, vectorLayer, lat, lon, zoom, target;
user = Traccar.app.getUser();
server = Traccar.app.getServer();
@@ -99,6 +99,22 @@ Ext.define('Traccar.view.Map', {
view: this.mapView
});
+ target = this.map.getTarget();
+ if (typeof target === 'string') {
+ target = Ext.get(target).dom;
+ }
+
+ this.map.on('pointermove', function (e) {
+ var hit = this.forEachFeatureAtPixel(e.pixel, function(feature, layer) {
+ return true;
+ });
+ if (hit) {
+ target.style.cursor = 'pointer';
+ } else {
+ target.style.cursor = '';
+ }
+ });
+
this.map.on('click', function (e) {
this.map.forEachFeatureAtPixel(e.pixel, function (feature, layer) {
this.fireEvent('selectFeature', feature);