Hello everybody,
has anyone managed to have multiple points on the same map?
I was able to retrieve the Longitude, Latitude and NameOfThePin data from my database and have it in an array like this:
[{“lat”: 41.9485498, “lon”: 12.5253454, “NameOfThePin”: “Colosseum”},
{“lat”: 42.9485498, “lon”: 12.2454454, “NameOfThePin”: “Piazza di Spagna”}, … etc …]
but how can I pass them one by one to the maps component to display each single record as a point on the map?
Of course I can pass:
pageVars.listSites[0].lat, pageVars.listSites[0].lon, pageVars.listSites[0].NameOfThePin and I get the first element drawn on the map, or pageVars.listSites[1].lat, pageVars.listSites[1].lon, pageVars. ListaSiti[1].NameOfThePin and I get the second one but how can I get them all?
thank you very much to anyone who wants to help me.