enketo-core
enketo-core copied to clipboard
Consider disabling auto-zoom for map-based input in geo widgets
The auto-zoom behaviour is probably only desired for the manual/detect/KML input, not for map-based input.
Copying problem description, from my perspective and what's happening at my end, from #314
Sample form : https://xhatj.enketo.org/webform (deployed from form on ona.io)
Typically, we have a habit of clicking and zooming out way to a location. When I click on the map, it might not be my final, selected position. Here, when if I have zoomed in to a location and click on a place, I'm doing it with the intention of moving that area to center view and then zooming in more to get a more accurate point. But the map instantly zooms back out as soon as I click. I have to then zoom in all over again.
If I have searched for a place, then the zoomout happens to that zoom level, which is still bad. Still bothersome. Many users might never use the search and simply pan and zoom their way to the location. After clicking, users need to see where exactly they've clicked. So no point in making the map zoom all the way out on click.
Any news on this? Some users are annoyed by the autozooming feature.
Thanks for your feedback. If one of Enketo's sponsors pushes for this, it will move forward (and include updating to latest Leaflet library first #400). I'd be excited to work on this but at the moment, there is no push for this.
FYI, there is an alternative (and brand new) Geo Widget which works with ArcGIS: https://github.com/enketo/enketo-core/blob/master/src/widget/geo-esri/README.md (but no geoshape/geotrace support yet)
PR is also welcome (especially if it includes #400).
FYI, there is an alternative (and brand new) Geo Widget which works with ArcGIS: https://github.com/enketo/enketo-core/blob/master/src/widget/geo-esri/README.md (but no geoshape/geotrace support yet)
Could you specify how to make use of this.. example from an ona.io account?
This is something that is configured in the Enketo installation. By default the widget is turned off, because it requires an arcGIS backend and doesn't have geoshape and geotrace yet. So you'd have to use your own Enketo installation and probably also your own Ona installation.
Is this issue still relevant? I'm seeing a similar problem:
https://drive.google.com/file/d/1VJIvSXbtGmFduhbmlhqWaGpk5Qxs501M/view?usp=sharing
Wouldn't a simple fix be something like this work?
Change:
this.map.setView( coords[ 0 ], this.lastZoom || defaultZoom );
To:
this.map.setView( coords[ 0 ], this.map.getZoom() );
Yes, this is probably still relevant, and a fix welcome. Please test all input methods as mentioned in first post.
Not sure about proposed fix. Not sure if the lastZoom and defaultZoom are useful in some cases. This code was written very long ago and the geo widget is a bit of a neglected child because Enketo's main sponsor (OpenClinica) doesn't use it.
Cool - I can take a look at this. I'm not sure what you mean by manual/detect/KML input though - can you explain more on this?
Edit: Nevermind - found it here https://support.kobotoolbox.org/collect_gps.html
Great! Thanks in advance!