Creating map with custom js chart

I’m trying to make a plotly map with the chart visualisation type with the custom chart type:
billede
It works fine with line charts, but I can’t get it to work with maps. Is that not supported? My code is taken directly from plotly.com:

var data = [{
  type:'scattermapbox',
  lat:['45.5017'],
  lon:['-73.5673'],
  mode:'markers',
  marker: {
    size:14
      },
  text:['Montreal']
}]

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

Plotly.setPlotConfig({
  mapboxAccessToken: "my.secret.token"
})

Plotly.newPlot(element, data, layout)