On Wed, Dec 5, 2012 at 9:19 AM, Derek Watling <[email protected]> wrote: > Eric, Thank you for clarifying the controls. > > I tried adding "stopUp = true" as in the following code: > > var control; > for (var key in measureControls) { > control = measureControls[key]; > control.events.on({ > "measure": handleMeasurements, > "measurepartial": handleMeasurements > }); > control.geodesic = true; > + control.handler.stopUp = true; > map.addControl(control); > } > > This works on the touch devices but breaks the measure when using a mouse, > ie. you click the first point and the map then drags. > > Is there any way of detecting touch devices?
One way: 'ontouchstart' in document.documentElement > What about devices that have > both touch and mouse? You probably want to rely on touch events for those. -- Eric Lemoine Camptocamp France SAS Savoie Technolac, BP 352 73377 Le Bourget du Lac, Cedex Tel : 00 33 4 79 44 44 94 Mail : [email protected] http://www.camptocamp.com _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
