There's already a callback for devices. Why not just use that?
From
devices.js: would this code be helpful ?
renderer: function (value) { var status; if (value) { status = Ext.getStore('DeviceStatuses').getById(value); if (status) { return status.get('name'); } } return null; }
how to add this handler to the above map on click callback so that the status of the device appears on the device location icon on the map (through a dialog window for exp) ?
This code has nothing to do with the map.
Not the map, but the device's status which i want it displayed when i click on the icon of the device on the map
For the map is this code the closest to what i want to achieve ? :
this.map.on('pointermove', function (e) { var hit = this.forEachFeatureAtPixel(e.pixel, function () { return true; }); if (hit) { target.style.cursor = 'pointer'; } else { target.style.cursor = ''; } });
you mean something like that?
Buenas Tardes Plutarco,
Esta muy interesante la funcionalidad de la ventana en mapa al seleccionar la unidad, llevo algo de tiempo tratando de implementarla, pero no queda jeje ... Alguna sugerencia de como llegar hasta ese grado como tu tienes implementado.
totalmente interesado
buenas tardes plutarco podrias indicar que archivos verificar o modificar para llegar al de tu imagen . gracias
Hello
I am trying to add a click event on the icon of the device on the map, and to do i am looking for the name of the feature and the layer responsible for that in Traccar so that i use the following code to achieve that :