Skip to content

Commit 81f9d53

Browse files
committed
use styleValuesNonMapbox in mapbox.style attr declaration
1 parent a460be0 commit 81f9d53

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/plots/mapbox/constants.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -142,16 +142,18 @@ var stylesNonMapbox = {
142142
}
143143
};
144144

145+
var styleValuesNonMapbox = Object.keys(stylesNonMapbox);
146+
145147
module.exports = {
146148
requiredVersion: requiredVersion,
147149

148150
styleUrlPrefix: 'mapbox://styles/mapbox/',
149151
styleUrlSuffix: 'v9',
150152

151153
styleValuesMapbox: ['basic', 'streets', 'outdoors', 'light', 'dark', 'satellite', 'satellite-streets'],
152-
styleValueOSM: 'open-street-map',
153154
styleValueDflt: 'basic',
154155
stylesNonMapbox: stylesNonMapbox,
156+
styleValuesNonMapbox: styleValuesNonMapbox,
155157

156158
traceLayerPrefix: 'plotly-trace-layer-',
157159
layoutLayerPrefix: 'plotly-layout-layer-',
@@ -171,7 +173,7 @@ module.exports = {
171173

172174
missingStyleErrorMsg: [
173175
'No valid mapbox style found, please set `mapbox.style` to one of:',
174-
Object.keys(stylesNonMapbox).join(', '),
176+
styleValuesNonMapbox.join(', '),
175177
'or register a Mapbox access token to use a Mapbox-served style.'
176178
].join('\n'),
177179

src/plots/mapbox/layout_attributes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ var attrs = module.exports = overrideAll({
4747
},
4848
style: {
4949
valType: 'any',
50-
values: constants.styleValuesMapbox.concat(constants.styleValueOSM),
50+
values: constants.styleValuesMapbox.concat(Object.keys(constants.styleValuesNonMapbox)),
5151
dflt: constants.styleValueDflt,
5252
role: 'style',
5353
description: [

0 commit comments

Comments
 (0)