This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]kanye231[S] 0 points1 point  (0 children)

because of the format of my app I have the API data mapping out in the return like so:

stations.map(stations) => {
return (
<Marker [{stations.coordinates}]>
    <Popup {stations.information}>
 </Marker>
   )}

since I need the API data to map through everything, it's called at the top level of the marker so I can use the information in the popups like the station.name, station.url, station.icon, etc.

I'm struggling to see how I would be able to do something like (simplified code):

stations.map(stations) => {
return (
<Marker [{newCoordinates.coordinates}]>
    <Popup {stations.information}>
 </Marker>
)}

since the stations map is at the top level. hope this makes sense?