Scattermapbox marker symbol

Found this post from 2017 listing the (then) icons:

Not sure what the icon set was in 2017, but it appears to be an issue with plotly.js. You can create a js plot with the following and get a warning from mapbox.

<head>
<script src="https://cdn.plot.ly/plotly-2.29.1.min.js" charset="utf-8"></script>
</head>
<body>
    <div id="myDiv">

    </div>
    <script type="text/javascript">
        var config = {mapboxAccessToken:"Your Token"}
        var data = [{
          type:'scattermapbox',
          lat:['45.5017'],
          lon:['-73.5673'],
          mode:'markers',
          marker: {
              size:14,symbol:'cross'
          },
          text:['Montreal']
        }]

        var layout = {
          autosize: true,
          hovermode:'closest',
          mapbox: {
              style:'outdoors',
            center: {
              lat:45,
              lon:-73
            },
            pitch:0,
            zoom:5
          },
        }

        Plotly.newPlot('myDiv', data, layout, config)</script>
</body>

image

I’ll see if I can come up with a reason.

1 Like