diff --git a/src/plots/mapbox/constants.js b/src/plots/mapbox/constants.js index 33fa21059ee..37f0dc8f3c8 100644 --- a/src/plots/mapbox/constants.js +++ b/src/plots/mapbox/constants.js @@ -142,6 +142,8 @@ var stylesNonMapbox = { } }; +var styleValuesNonMapbox = Object.keys(stylesNonMapbox); + module.exports = { requiredVersion: requiredVersion, @@ -149,9 +151,9 @@ module.exports = { styleUrlSuffix: 'v9', styleValuesMapbox: ['basic', 'streets', 'outdoors', 'light', 'dark', 'satellite', 'satellite-streets'], - styleValueOSM: 'open-street-map', styleValueDflt: 'basic', stylesNonMapbox: stylesNonMapbox, + styleValuesNonMapbox: styleValuesNonMapbox, traceLayerPrefix: 'plotly-trace-layer-', layoutLayerPrefix: 'plotly-layout-layer-', @@ -171,7 +173,7 @@ module.exports = { missingStyleErrorMsg: [ 'No valid mapbox style found, please set `mapbox.style` to one of:', - Object.keys(stylesNonMapbox).join(', '), + styleValuesNonMapbox.join(', '), 'or register a Mapbox access token to use a Mapbox-served style.' ].join('\n'), diff --git a/src/plots/mapbox/layout_attributes.js b/src/plots/mapbox/layout_attributes.js index 0c45895a402..598c1a1e5b2 100644 --- a/src/plots/mapbox/layout_attributes.js +++ b/src/plots/mapbox/layout_attributes.js @@ -47,7 +47,7 @@ var attrs = module.exports = overrideAll({ }, style: { valType: 'any', - values: constants.styleValuesMapbox.concat(constants.styleValueOSM), + values: constants.styleValuesMapbox.concat(Object.keys(constants.styleValuesNonMapbox)), dflt: constants.styleValueDflt, role: 'style', description: [