This is my second project, the first one was extremely basic though. Is there any simpler way to do what I am trying to do? Did I choose an extremely complex task? II don't know lookup tables and am not completely familiar with all the map components. I will read them now.
Not in the USA; the postal codes areas are unusual shapes. You might be in the centroid of your postal code AREA
Thanks for the list
I will give all this a try in a few minutes and then get back to you guys. Thanks for the help I greatly appreciate it.
Probably you just want them to enter their address. The location sensor can figure out latitude and longitude.
Geocode converts an address into a latitude and longitude . You need a latitude and longitude to place a Map Marker on a Map using the Map control
This code does Geocoding. It determines the latitude and longitude for addresses in Google's database. All addresses are NOT in that database.
Put your address in a Text Box in the LocatioinSensor1.Geocode address empty puzzle piece and this code will provide a location that should be very close to your exact location .
Don't bother with the markers and the lines and the polygons, just stick to the map component, its centering and its size.
Thanks, I'll go with that. I'm not understanding ABG lookup tables and all of that. I'm in a class that uses the program along with PLTW and I've only ever used this for a few months now. However, all the coding has been extremely basic. In the past I did some work with code.org, but that was also really basic.
How have y'all been coding? You seem like experts.
Since 1966.
I'm expert at not being an expert.
Sooner or later, you will have to learn to use data that comes in lists and tables.
Steve, when coding this for the last part that you crossed out what do I put there. I'm guessing it varies from person to person and that was personal information.
yes that was my address. Use your address; just type it in as how someone would address a letter to you. Zack, 123 5th Street, Maybe, Pennsylvania perhaps
If you haven't read this advice yet it might help.
Here are some resources to help you learn to use the AI2 tools. A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook App Inventor 2 Book: Create Your Own Android Apps ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here Course In A Box and the aia files for the projects in the book are here: App Inventor 2 Book: Create Your Own Android Apps
How to do a lot of basic things with App Inventor are described here: How do you...? .
Also look here App inventor español. Offline. Tutorial. Ejemplos. Instalación. Códigos. Juegos. Curso gratis de App inventor. and here Tutorial Index | imagnity for more tutorials including Imagnity.com List Tutorial, Mirrored - @Saj
Learn about components Component Reference
and visit the Library The MIT App Inventor Library: Documentation & Support Help>Library on the MENU
Here is what I have so far, but for some reason the whole screen is now just blank if I load it up. Also how do I incorporate this with my user input aspect. Should I make an address variable and then have it so when the user enters their address it updates the variable? This would then be called in the got location from address event handler.
Can you explain this Steve?
You changed some of the names which may have affected your display and I know only realized you have to assign what you have changed to Address1.Text. It needs to go to a Label so it displays.
Yes, mainly so you use it anywhere in the app. Call it locationAddress or anything other than address.
Yes, that is one way. Then the locationAddress could be used to post a Marker on a Map component.
Got the blank issue fixed up, I had some naming errors on accident. I'm going to try and get the rest of the app working tonight.
What code is used to make it travel to the location sensor coordinates.
I have this so far - Address is the location sensor, Address 2 is the label, and Texboxx 3 is where the user types in their address. Address 1 is a button, but I think it's unnecessary now. Is there anything I'm doing wrong? Do you use commas when typing into the textbox?
I code differently however you probably can use your basic approach.
You might not want to set TextBox3.ReadOnly to true. If you do you will not be able to type in a different address.
I use a Button1 to transfer the lat and lon to a Marker in the Map component so I need global variables because the local variables in the GotLocationFromAddress Block can't be used in the Button1. So I use Entered_address, userLatitude and userLongitude and set them to locals address,latitude and longitude in the GotLocationFromAddress Event handler. Then Marker1.SetLocation latitude is set to userLatitude and longitude is set longitude.
I have a few more Blocks to make it pretty and provide limited error control.
No but I expect some address might require them . Look at the example screens.