I have a GIS API that uses the OpenLayers 2.13 measure and drawFeature controls. But let's just talk about the measure control, because the issues are certainly connected.
As I show in this CodePen, the measure control is supposed to show the immediate measures, i.e., print them on mouse move.
measureControl = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, measureControlOptions);map.addControl(measureControl);measureControl.events.register('measure', measureControl, function(e) { printOutput(e);});measureControl.events.register('measurepartial', measureControl, function(e) { printOutput(e);});Of course, when I use this example in a touch device, I can't use the onmousemove event. Instead, the behaviour is like this:
I am not very familiar with touch events, so I apologize if this is a stupid question. but is there an easy way to mimim the mouse behaviour on the touch device?
The desired behaviour is something like:
أكثر...
As I show in this CodePen, the measure control is supposed to show the immediate measures, i.e., print them on mouse move.
measureControl = new OpenLayers.Control.Measure(OpenLayers.Handler.Path, measureControlOptions);map.addControl(measureControl);measureControl.events.register('measure', measureControl, function(e) { printOutput(e);});measureControl.events.register('measurepartial', measureControl, function(e) { printOutput(e);});Of course, when I use this example in a touch device, I can't use the onmousemove event. Instead, the behaviour is like this:
- 1st tap to start measuring
- 2nd tap to stop measuring
I am not very familiar with touch events, so I apologize if this is a stupid question. but is there an easy way to mimim the mouse behaviour on the touch device?
The desired behaviour is something like:
- tap down --> starts measuring
- tap move (without lifting the finger) --> keeps measuring and show the new measurement on each move
- tap up --> stops the measurement
أكثر...