Skip to first unread message

Charles Schwedes

unread,
May 28, 2018, 3:41:27 PM5/28/18
to mitappinv...@googlegroups.com
Hi,

I have created a list of Names and addresses. How do create a Lat and Long for a particular location. Any ideas? Thanks, Charles

Chris Ward

unread,
May 28, 2018, 4:17:13 PM5/28/18
to MIT App Inventor Forum
Hi Charles

If it is a static list (one that the User does not need to edit in-app), then you can simply add associated lists of Lat and Long - verified via Google Maps for each address.

SteveJG

unread,
May 28, 2018, 4:24:09 PM5/28/18
to MIT App Inventor Forum
You can find the latitude/longitude of any address if you know the address  https://developer.mapquest.com/documentation/tools/latitude-longitude-finder/  

Regards,
Steve

TimAI2

unread,
May 28, 2018, 4:37:56 PM5/28/18
to MIT App Inventor Forum
Nice link Steve :)

Chris Ward

unread,
May 28, 2018, 4:44:06 PM5/28/18
to MIT App Inventor Forum
That is a nice link - in fact a very interesting website with a lot to offer. 

Charles Schwedes

unread,
May 28, 2018, 6:04:55 PM5/28/18
to MIT App Inventor Forum
SteveJG and all,

I have created a list, "List Picker', with Names each associated with sub-entries - Address,Lat and Long. The Addresses are from my Contact List. Your link is great and I could certainly use it to compute Lat & Long. I guess I could use Google Maps and a 'click' to get the correct spot on a map to create a Lat/Long. I was hopeful that an App Inventor function could create these positions for me. Thanks, Charles

Note: An automatic system would be hopeful for I'll certainly have lost you link the next time I need it! .😎

SteveJG

unread,
May 28, 2018, 7:46:08 PM5/28/18
to mitappinv...@googlegroups.com
Oh, that can be done too.

Where the text in the TextBox is   1600 Pennsylvania Ave. Washington D.C. and results in


seems to work.  Compare the results with the information here  https://www.latlong.net/place/the-white-house-washington-dc-usa-20381.html    
Use a LocationSensor on the Designer, with the Enabled turned off  (i.e. Enabled = false )., a Button, and two Labels. The device must be connected using WIFI or network .


Yes, this concept could be used to plot points on a map where the locatonName comes from a List..   The technique would work either using the Google Static Map API or using the new MIT Map component.  

This will not find every address and it might be request limited.   Why not try some code and return and show us how it works Charles?  or try these:

to render  a map like this one using the MIT Map component? You need a Map component and a Marker dropped on the Map.  Simple.


Regards,
Steve


Charles Schwedes

unread,
May 28, 2018, 9:06:51 PM5/28/18
to MIT App Inventor Forum
Steve,

So far... Brilliant! Everything works just as I'd hoped. I seem to have been able to Add to a new list. Steve that is really good work. Thanks, Charles
Capture.PNG
Capture1.PNG

Charles Schwedes

unread,
May 30, 2018, 7:30:36 PM5/30/18
to MIT App Inventor Forum
Steve,

The Location Sensor was turned off and kept off! Everything works well on my USB Emulator. I then load the APK. Fine. But when I selected the Map I got a runtime Error with the message, "Unable to load SVG asset". What did I do wrong?

 Thanks Charles

SteveJG

unread,
May 30, 2018, 10:02:55 PM5/30/18
to MIT App Inventor Forum
Did you place a Marker on our Map component? You need that.

Charles Schwedes

unread,
May 31, 2018, 1:14:36 AM5/31/18
to MIT App Inventor Forum
Yes I think I did. You can see I have a variable 'Marker' with Map1.Create Marker. With the emulator the Map shows the location correctly, with a marker. Charles
Capture.PNG

Charles Schwedes

unread,
May 31, 2018, 9:28:12 AM5/31/18
to MIT App Inventor Forum
SteveJG,

I finally figured out what you meant about the Marker. The system now works perfectly. Do you have a tutorial on the other Map functions? For instance - Changing the zoom. If anyone is interested in the blocks I used to create the Map proc let me know and I'll send them as and attachment to the forum. Thanks again Steve for all you help. Charles

SteveJG

unread,
May 31, 2018, 4:29:32 PM5/31/18
to MIT App Inventor Forum
Search for. MIT Map . In the forum. There are links to a simple MIT Map tutorial, the map documentation and several aia files and sample code, You got to look through the articles.
Reply all
Reply to author
Forward
0 new messages