We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I've constructed this code based on the principles of Daniel Schiffmans 'exercise_18_15_new_bubbles_xml.pde' on Github.
All is going well, except that I am having difficulty applying it using Unfolding Maps to display train locations from an XML file.
I wish to display either a 'SimplePointMarker' (from the Unfolding Maps library) or a simple ellipse for each train location. My difficulty is with the mapping. I can map one train with no issues but unsure how to map all within the array.
I have tried a few things like making an array of train locations separately and making another object to handle mapping but both have failed.
The code is posted below. The core issue lies on line 80.
The XML data is contained in this link. I copied it to a static XML file: https://data.smartdublin.ie/cgi-bin/rtpi/realtimebusinformation?stopid=7602&format=xml
Any help would be greatly appreciated. Thank you :)
*I edited the code to be more simple in my response below