enketo-core icon indicating copy to clipboard operation
enketo-core copied to clipboard

Consider disabling auto-zoom for map-based input in geo widgets

Open MartijnR opened this issue 9 years ago • 9 comments

The auto-zoom behaviour is probably only desired for the manual/detect/KML input, not for map-based input.

MartijnR avatar Mar 05 '15 16:03 MartijnR

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.

answerquest avatar Sep 19 '15 01:09 answerquest

Any news on this? Some users are annoyed by the autozooming feature.

Lunkster avatar Jun 22 '17 15:06 Lunkster

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).

MartijnR avatar Jun 22 '17 16:06 MartijnR

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?

answerquest avatar Aug 03 '17 13:08 answerquest

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.

MartijnR avatar Aug 03 '17 14:08 MartijnR

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() );

green3g avatar Mar 17 '21 17:03 green3g

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.

MartijnR avatar Mar 17 '21 17:03 MartijnR

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

green3g avatar Mar 17 '21 17:03 green3g

Great! Thanks in advance!

MartijnR avatar Mar 17 '21 17:03 MartijnR