Scattermapbox marker symbols


One of the elements of my Dashboard is a mapbox map which is built by reading in a CSV file. This file has ‘Latitude’, ‘Longitude’, ‘Name’ and ‘Type’ as columns

The column ‘Type’ has the values of either ‘Transmitter’ or ‘Receiver’.

How can the markers on the map be made to -

  1. Have a colour based on the ‘Type’ column - so ‘Red’ for ‘Transmitter’ and ‘Blue’ for ‘Receiver’ (say)? OR
  2. Have a symbol based on the same column - so 'Triangle" for transmitter and “circle” for receiver?

I have tried to modify the marker property using the following lines (mapPoints = map dataframe) -

“marker”:{“size”:9, “opacity”:1.0, “color”: mapPoints.Type}

but all points are of the same colour. Similar behaviour is seen for symbols too.

Please help