Enhanced Touch Drawing for farmOS

I have been working on a new drawing interaction for farmOS to better support accurate drawing with lower accuracy input methods like touchscreens on phones.

In general OpenLayers (the library on which farmOS’ map is built) works well with touch interfaces, but there are inherent limitations in how precisely one can “click” by touching the screen - as compared with a mouse. There are also complexity barriers to using some of the existing mapping controls effectively in the field.

My hope is to help address those shortcomings and make a larger portion of the mapping one might need to do in farmOS viable to do via mobile devices - and hopefully in the field :slight_smile:

My hypothesis is that a large portion of the mapping that one might need to do on mobile is in relation to and orthogonal to some existing geometry.

Here’s a preview of my progress on interaction;

Peek 2021-04-14 10-45

Basically, when the interaction is active, the map will include “proposed drawing handles” on existing line segments. Those handles can be used to start drawing a new geometry. The resulting “draft geometry” can be resized/moved using large touch friendly handles until it is either saved or canceled. The size and movement can also be specified via the input boxes which appear when the handles have been moved.

The purpose of this thread is to document progress on the new functionality and solicit ideas/feedback about how/when features like this would be most useful to folks’ in farmOS.

I’ll update this initial post soon with a summary of the outstanding tasks that I know of to bring this tooling to farmOS/farmOS-map as well as a set of questions for the community.

Outstanding tasks

Questions for the Community

  1. How often would you (or your user-base) imagine using this functionality? Daily, Weekly, Monthly, Maybe a Few Times a Year, Never?
  2. Is the concept of an “draft” geometry that isn’t saved until the green check button is clicked intuitive enough? (Obviously assuming I’ve made the button accessible with aria text, etc.)
  3. If it is possible to detect touchscreen usage while drawing, should this functionality get activated automatically? Alternatively, should it always require explicitly selecting it? i.e. As an alternate “mode” of polygon drawing.
  4. There are a number of input boxes which appear when resizing or moving the “draft” polygon. These clearly need a way to select the units. Should those units be separate for each input box or should there be one unit selector for all the input boxes?

Cheers,
Symbioquine

4 Likes

This is awesome. Thank you!

1 Like

Thanks @Lars! I’m super excited about it too.

2 Likes

I’ve updated my initial post with my understanding of the remaining tasks and some questions for the community. Really looking forward to everybody’s thoughts!

1 Like

I’ve published the basic functionality as a stand-alone library for OpenLayers: GitHub - symbioquine/ol-touch-draw: Provides a simplified touch-friendly drawing interaction for OpenLayers 6

Now I’m looking at options for integrating it into farmOS/farmOS-map…

I’m also still looking for feedback on the questions I posed above.

1 Like