Aaron Buller

unread,
Feb 25, 2016, 4:20:37 PM2/25/16
to MIT App Inventor Forum
hello everyone i was wondering how hard it would be to make a gps app that will let me save the location of the rooms so that new students coming to campus can find their classes. so i was wondering if i could do it in a way that would let me save the latitude and longitude and then save it under the room name a number. and i dont know enough about this program to do this.

SteveJG

unread,
Feb 25, 2016, 4:48:33 PM2/25/16
to mitappinv...@googlegroups.com
What you want to do is not difficult Aaron; provided you have done some homework.  What tutorials have you done?

Be aware, the GPS receiver does not always work well inside a building. Yes, it is possible you can locate a room by GPS as long as you realize that.



Start here   Exploring with Location Sensor in AI2                   

and proceed to the tutorials here     https://appinventorforfun.wordpress.com/tag/mapping/  .  There are a lot of tutorials there regarding using the GPS and mapping at that site.  I suggest you first do the Location Sensor tutorial;
then this one (to make sure your GPS is actually working)  on your device:

Where Am I? … a very simple LocationSensor Tutorial     

 and then do one of the tutorials that shows how to produce a Google Static Map. The Magic map pins app might be what you want.  This tutorial shows how to tell someone how far the room is from their current location  

AI2 Static Maps 104…calculate distances between points and add an Accuracy Square



This tutorial, which is more complicated that the situation you describe 

Reserve a Thing…or anything you want – The Mechanics of Coding a Complex Problem with AI2

shows how to locate buildings on a campus to find interesting things; the things could be class rooms.


When you are reviewing the tutorials, look at techniques described for a 'ring fence'  or  others that help you tell your app user when they have arrived at their classroom.  To do a ring fence, you need the geocoordinates (latitude/longitude of a rectangular object that defines the classroom.     An example ringfence is show here    http://www.appinventor.org/bookChapters/chapter18.pdf          in the section Programming Complex Conditions


GPS is not difficult to program, it is difficult to understand how it works, why it occasionally does not work and how you can use the LocationSensor to effectively work with GPS in an App Inventor Project.  

When you are comfortable, create some blocks and if you still have issues, show us an image of the blocks you tried. Your Project does not need to be as complicated as the Projects shown in the tutorials.

If you have a List of the rooms with the corresponding geocoordinates, you can do this all with the LocationSensor, a List and a ListPicker.


Regards,
Steve
This post has been edited
Mark as complete

Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages