Store a list of coordinates in TinyDB and create clickable map markers of them

Hi,

my plan is to create an app where the user can create multiple map markers based on their current location, give them a description and display it in the InfoBox of the Marker.

I've already stored the current location in a TinyDB (but I think I'll have to make a list to continue creating markers) and displayed it as a marker on another map screen.

How do i make this created marker clickable?
How will it become an object, like an object in the Design section, So that it can stores informations?

Thanks in advance for your help.

Hubert

Hmm.

Please read this Hubert Plot Multiple marker in map using List. It discusses most of what you want to do (except storing information in a TinyDB). Read the information about the National Park tutorial that is mentioned to learn how to make a created Marker clickable.

Yes, you will have to make a List. I advise you not to use separate screens, or use your global place_lat and lon in the placedMarker. Initialize Screen. When you switch to that screen, the LocationSensor will most likely provide a location of 0,0 because it probably will not have yet obtained a satellite fix (that takes 20 to 40 seconds on most devices).

Consider reading and doing the two tutorials Using the Location Sensor if you have not already done so. Also, the Map component documentation is Map components

Your app is an ambitious Project for a new App Inventor 2 user . 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 http://www.appinventor.org/book2 ... 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 http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles

How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also look here http://kio4.com/appinventor/index.htm and here http://www.imagnity.com/tutorial-index/ for more tutorials.

Regards,
Steve

1 Like

Thanks for the suggested approaches. Appreciate it :blush:

Steve! :blush:
I got things going with an google sheets list. And your script from the National Park Runtime markers.
Thanks for that!

The only problem: Google Sheets format my entered coordinates as 48.146.503 and not as 48.146503 so the create marker function can't read them....

I'm struggling so hard right now to format my coordinates in google sheets......
Any ideas?

Thanks in advance!

actually this is a Googlesheet question and not directly an App Inventor question, isn't it?
how did you format that column? you might want to try a custom number format...


Taifun

Thanks for the response.
yes sorry, that's an google sheet question but I'm struggling an hour right now with custom number formats.... lon works in the meantime lat doesn't
anyway...