Recording GPS Points from Google Maps to App Inventor 2 App

4,477 views
Skip to first unread message

Ewen Maclean

unread,
May 5, 2015, 4:21:25 AM5/5/15
to mitappinv...@googlegroups.com
Can you record GPS points from Google Maps and then display these selected GPS points on an app in App Inventor 2?

Ewen

Ewen Maclean

unread,
May 5, 2015, 4:33:46 AM5/5/15
to mitappinv...@googlegroups.com
Also could i record a walking route and then store it on my app as well?

Ewen

SteveJG

unread,
May 5, 2015, 8:01:49 AM5/5/15
to mitappinv...@googlegroups.com
Yes to both of your questions. 

Do the following tutorials and you will know how to record 'bread crumbs' or way points.

The LocationSensor tutorial http://appinventor.mit.edu/explore/ai2/location-sensor.html .  This tutorial shows one way to generate a list of waypoints and displays the list of lat/lon coordinates once a minute or so.  This could be modified so that the points can be captured only when a button is touched.  The list, which includes the time and Accuracy, can be displayed with only the coordinates ...the way points.

AI2 Static Maps 102…the Magic Map Pins Tutorial demonstrates how to use map pins in conjunction with a device's GPS receiver.

The Static Maps tutorials plot the information on a Google map and require a WIFI or network connection.  It is possible to plot this information also on a map you provide if you know the geographic coordinates of two alternate corners of your own image map.  It requires a lot of coding, uses a Canvas control and the World to Screen algorithm shown in this tutorial: 

Canvas Graph…an expert AI2 tutorial  ..you need the algolrithm for placing each of the x and y coordinates on to the Canvas.


The following two mini tutorials show how to store the information in a TinyDB


  

However the solution I like best would store the breadcrumbs / way points in a csv file using the File object.



An issue here is how to store the latitude , longitude coordinates,   one way is to display coordinates like those for Yellowstone National Park ( 44.427963,-110.588455 ) like this:  "44.427963,-110.588455" inside double quotes as a single csv item.  The File mini tutorials do not show exactly what you need to do.

Does this help?   Good luck with your project.

Regards,
Steve







Reply all
Reply to author
Forward
0 new messages