anupmishra20 / opendatakit

Automatically exported from code.google.com/p/opendatakit
0 stars 0 forks source link

Getting location by click on a map #826

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As requested on the formhub community forum 
(https://groups.google.com/d/msg/formhub-users/vUM_-W49OgI/fu0V-zLk1zEJ), I 
would like to collect location data, but not (or not only) with GPS, but 
clicking on an interactive map (google map).
It seems to be impossible now.
(data will be collected in ODK Collect).
Thanks

Original issue reported on code.google.com by montagne...@gmail.com on 15 May 2013 at 10:21

GoogleCodeExporter commented 9 years ago
I wish to provide some clarification on this matter, in order to contextualize.
We wish to collect data of fauna and flora. When the observer collect a specie, 
it is not exactly accurate his place, but often a few tens (hundreds) of meters.
So, have a clickable map (satellite view) would be very appropriate to collect 
the data.

Original comment by montagne...@gmail.com on 27 May 2013 at 3:58

GoogleCodeExporter commented 9 years ago
The core team does not have the resources to implement this. It requires a new 
widget written in Java. We would gladly accept a code contribution developed 
and released under the Apache2 License.

Google Maps does not currently allow satellite imagery to be accessed off-line 
(you need a wireless connection).

However, sometime this summer (according to a presentation at Google I/O 2013), 
they will release an updated Android library that will enable the offline 
access to a map  Once this Android library is released, it would be feasible to 
develop this new widget.

One caveat: generating the offline-accessible map data will require Google Maps 
Enterprise -- something that may be too costly for most non-profits and NGOs 
(or perhaps Google would provide support to them?)?

Original comment by mitchellsundt@gmail.com on 4 Jun 2013 at 8:08

GoogleCodeExporter commented 9 years ago
Thank you for your reply.
In our case (nonprofit organization), we do not have Google Maps Enterprise. 
However, our devices are wireless and internet connection (like most Android 
smartphones nowadays).
So a widget to enable Google Maps online would be fully operational.
It would suffice to this widget to request permission to access the internet.
However, I understand that these developments are complicated, and I 
unfortunately do not have the skills to develop this ...
I hope I'm not the only one to identify this need!
Thank you again.

Original comment by montagne...@gmail.com on 5 Jun 2013 at 7:54

GoogleCodeExporter commented 9 years ago
I'm currently doing a patch about this. In fact it's done but I'm still 
searching how to submit it (I'm new to all this contribution system). It will 
come asap. It uses Google maps api v2 and the android support library v4 (gMaps 
v2 uses fragments).

Original comment by guisal...@gmail.com on 2 Jul 2013 at 11:49

GoogleCodeExporter commented 9 years ago
When you fill out a comment on this issue, there is an 'Attach a file' link 
below the comment area. If the patch is too large, send it directly to 
mitchellsundt@gmail.com

Original comment by mitchellsundt@gmail.com on 2 Jul 2013 at 5:18

GoogleCodeExporter commented 9 years ago
Great!
Thank you for the work accomplished! I can not wait to test it!
Sylvain

Original comment by montagne...@gmail.com on 2 Jul 2013 at 8:14

GoogleCodeExporter commented 9 years ago
And here it is.
The map now allows the user to set a custom location : 
If you press a few time on a location on the map, it will place a marker which 
will be draggable and stop the location provider updates. If you prefer to wait 
for the location updates the marker will be draggable after the accuracy is 
below a certain level (defined in GeoPointWidget).

I've changed GeoPointMapActivity.java which now uses the google maps api v2 
(com.google.android.gms.maps) and the android support library v4 
(android.support.v4).
GeoPointLayout has been modified too, to integrate the fragment, and I've used 
some drawables from android resources.
About the manifest, I forgot to add it to the patch : you will need to add two 
permissions (com.google.android.providers.gsf.permission.READ_GSERVICES and 
org.odk.collect.android.MAPS_RECEIVE, which you will have to define with 
protection level signature) and generate an api key (http://goo.gl/420bY).

Original comment by guisal...@gmail.com on 4 Jul 2013 at 9:54

Attachments:

GoogleCodeExporter commented 9 years ago
Hi , we have a similar issue, we need to choose  a location on a map 
(preferably offline) and then submit those coordinates to ODK along with the 
other data collected by the form. I am not technical, I see the thread here and 
would just ask if this will solve my problem and some guidance on how to 
achieve this if possible. 
Thanks
Neal

Original comment by nealmoor...@gmail.com on 31 Jan 2014 at 7:22

GoogleCodeExporter commented 9 years ago
Please see the 'placement-map' appearance of the geopoint type:
http://opendatakit.org/help/form-design/examples/#geolocation_prompts

This is available on newer phones, requires internet connectivity, and Google 
Services to be installed on your phone.

Original comment by mitchellsundt@gmail.com on 14 Feb 2014 at 11:34

GoogleCodeExporter commented 9 years ago
Closing, as I believe this functionality is now available through the 
placement-map appearance.

Original comment by mitchellsundt@gmail.com on 14 Mar 2014 at 12:23