I want to make an application.
This application has function as the followings,
To get plural sets of latitude and longitude data from CloudDB.
To display Markers on the Map.
In order do to 2., I apply "For Each" structure in my application.
Looking up the execution of this application, I found this application displays once Marker but erase previous Marker at displaying latest Marker.
If I have to display 3 Markers, application finally writes 3 Markers and deletes no.1 and no.2 Markers, remains only no.3 Marker.
I do not know reason why "For Each Loop" erase previous Marker.
Is there any way to remain all Markers on Map.
ss
In order to provide specific advice we need some additional information from you @shigeki_suzuki .
are you using run time Markers (using Create) or design time Markers (those markers using default Marker1, Marker 2, and so fourth). It makes a huge difference in what you use.
please provide an image of your Blocks here.
how many Markers do you expect to display (how many markers does your Project need ?) Only 3 markers in total?
If you use design time markers, what you want to do should be relatively easy when using the CloudDB tool; using run time markers with CloudDB is much more complex.
No one else knows because you did not share your code. We cannot see what you coded.
Be aware, you might be posting markers on top of existing markers giving the appearance that previous markers disappear.
All the Markers are posted to the Map. You set each marker with initial coordinates of 0,0 . What happens is Marker1 is posted; Marker2 is posted on top of Marker1 and hides Marker1. Marker3 is posted on top of Markers 1 and 2, hiding them. Marker4 is the last Marker posted.. It post over 1,2 and 3 so you only see Marker4 because, at the moment all the markers are at 0,0 lat/lon.
They are NOT erased only covered by other markers in your example and 'hidden' from view.
An experiment
Make a Button and place the following code in the Button.Click as a Block to:
set Marker4.Visible to false
The code will hide Marker4 and you should see Marker3
Hi JG
Experiment results true.
Set New Marker makes to hide previous Marker.
That is correct.
It is inconvenient.
how to show all Markers using For Each structure.
This example may be helpful to plot all four Markers prior to using your database.
Without seeing an example of your database, I can not help you. Tell me what you are trying to do with your database and provide an example of the database.
thanks JG
i did use block like you suggest.
For Each structure override and hide previous Markers, so I must select the same blocks as you suggest.
I want App Inventor that For Each block not to overlay previous Marker . But it can not.