No, I didn't create a list. I attempted to just have the user enters their location and then the map could pull that from a dynamic list to show them there location.
Should I create a database and then do something similar to your code ABG? I could use the list SteveJG provided me with that gives the centroids of all the zip codes in the US. However, if I can't copy it in and have to manually type it out that would be a struggle.
Should I just have the user enter their zip code or whatever location I decide to use on the same screen as the map?
This looks a little confusing to me. I'm unfamiliar with a lot of the more complex components. Still figuring out the program.
It was bang on centre of my postcode in the UK. Depends on whether close enough is good enough.
It looks like you need to do a little reading.
Is this your first project?
Which tutorials have you done?
Since you will be using the Map component, you should be familiar with the attributes and blocks of the Map component.
See
https://ai2.appinventor.mit.edu/reference/components/maps.html#Map
for all the display features for sizing and especially the Pan To block.
You will need to upload a zip code table into the Media folder in the Designer, and load a lookup table from it in Screen1.Initialize.
Then you will need to learn to do table lookups.
Here's your Comma Separated Values (CSV) table, from @SteveJG's link:
US20Codes20201320Data.txt (906.3 KB)
Here are some sample projects that load tables from the Media folder and do lookups:
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?