HELP PLS! Map Tour App - adding markers in blocks and text to speech with their titles

someone please help me do this:
Add a new marker when the user adds a destination to the list and have the Text-To-Speech component speak the Marker titles when clicked.


this image is the code relating to this, there more with the other stuff but not important for my problem
this is the aia file
MapTourComplete.aia (5.9 KB)

See the displayLocations procedure in

for how titles are loaded into new markers.

found it, but im still very confused

im confused abt what variables to use and I'm also getting errors and the text to speech for the markers I add aren't working

Have you learned yet how to keep a table in TinyDB?

You must also learn how to loop through a table of map points and titles and load them into a map.

Show your latest blocks and error messages.

  • your app uses Design time Markers so you cannot add any more Markers with code and expect them to display on the map. Use Run time Markers (using the
    createMarker3 ) to 'create' additional markers

or add more Design time Markers than you expect to ever use. Set the inactive Design time markers to Marker4.VIsible = false until you need them.

  • your present code does 'add' more Marker coordinates to your List but you never assign the coordinates to a Design time marker so the new locations cannot display at present. Because you haven't assigned a marker to the coordinates your TextToSpeech will not work for the added locations because it depends on a marker existing.

You can try these Blocks with the example aia you posted.

The additional Blockks will add Runtime Markers . :cry: However the Markers are not persistent, you have to add your own code to 'save' these 'added' locations for the next use of the app. I did not attempt that.

Regarding the NationalParks Tutorial; add the following code to the tutorial and pressing the location marker will 'speak'

nationalParksTTS

Yes, that is all you need to do with a Run time marker. :wink:

1 Like

ok, thanks so much!!! it works but I get this error message after I input the name for my marker locations but the text-to-speech still works after that


this is the code and also it seems that the tiny db isn't working either for my added markers

solved this it was the info pox that was the problem, removed that, no more problem and everything still works

i still need to figure out the tiny db, it saves the location in my global destinations variable and in my list picker but not the physical marker on the map

Glad the Run time and TextToSpeech code suggested are working.

You are coding on an ios device. App Inventor for ios is still VERY buggy.

Perhaps this discussion applies TinyDB-problem with iOS with respect for ios Projects and TinyDB use.

Do be aware, your markers stored in the TinyDB doesn't have any associated code to load the 'saved location information on Screen1.Initialize to your markers List , saving markers alone is not going to accomplish this. Saving and reloading Runtime markers has to be done using additional code to re-initialize run time markers using the CreateMarker block. Perhaps use the methodology shown in the NationalPark Tutorial. I think you should be save the Marker data stored as a csv and use that csv to repopulate markers or something like that. I can only guess.