Ok, I will try that out
Many Thanks Levi
Ok, I will try that out
Many Thanks Levi
That idea almost works except is it still difficult to work out which marker is the most recent from the user’s perspective, is there a way I can make the marker be green for example when it is the most recent, the change to red after a new marker has been placed?
Many Thanks Levi
See how it looks a bit random.
In your count with i
loop, you’re cycling through all of the lat/lon values and adding markers. But the last row in the data source contains the most recent/current location. So in that loop, add an If block that says if i=length of app variable latlist then set pinColor to green (or whatever color)… else set pinColor to black (or whatever color).
Ok thanks for the info, I will try that out today.
Many Thanks Levi
Yes.
What Part of it am I doing wrong?
You’re on the right track but if you read my post carefully, the If condition I suggested is i = length of app variable latlist
. In that last screenshot, you have the If condition as length of i = app variable latlist
. That won’t work.
The point of checking the value of i is that it’s the loop index. So when i is equal to the length of the list that you are looping through, that means you’ve reached the last item in the list.
Nope, that’s still the same thing. You just switched the sides of the same equation. Here’s what you need:
Oh, Ok, Thanks, I will try that.
Do I keep both of the blocks to place markers?
Yes. Because the if
condition has two possible values: true or false. So if true, then you’ll create a marker with a green pin; and if false, then you’ll create a marker with a red pin.
Cool, thanks also do I need to change anything on the first marker to do with the lat and long, or should I keep them as they are on 0?