Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 95e4206

Browse filesBrowse files
committed
define mapbox style keywords
1 parent c2663ed commit 95e4206
Copy full SHA for 95e4206

File tree

Expand file treeCollapse file tree

1 file changed

+55
-40
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+55
-40
lines changed

‎src/plots/mapbox/constants.js

Copy file name to clipboardExpand all lines: src/plots/mapbox/constants.js
+55-40Lines changed: 55 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,60 @@ var stamenWaterColor = [
2626
'under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'
2727
].join(' ');
2828

29+
30+
31+
var cartoPositron = {
32+
id: 'carto-positron',
33+
version: 8,
34+
sources: {
35+
'plotly-carto-positron': {
36+
type: 'raster',
37+
attribution: carto,
38+
tiles: ['https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png'],
39+
tileSize: 256
40+
}
41+
},
42+
layers: [{
43+
id: 'plotly-carto-positron',
44+
type: 'raster',
45+
source: 'plotly-carto-positron',
46+
minzoom: 0,
47+
maxzoom: 22
48+
}],
49+
glyphs: 'https://fonts.openmaptiles.org/{fontstack}/{range}.pbf'
50+
};
51+
52+
var cartoDarkmatter = {
53+
id: 'carto-darkmatter',
54+
version: 8,
55+
sources: {
56+
'plotly-carto-darkmatter': {
57+
type: 'raster',
58+
attribution: carto,
59+
tiles: ['https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png'],
60+
tileSize: 256
61+
}
62+
},
63+
layers: [{
64+
id: 'plotly-carto-darkmatter',
65+
type: 'raster',
66+
source: 'plotly-carto-darkmatter',
67+
minzoom: 0,
68+
maxzoom: 22
69+
}],
70+
glyphs: 'https://fonts.openmaptiles.org/{fontstack}/{range}.pbf'
71+
}
72+
73+
74+
2975
var stylesMapbox = {
76+
'basic': cartoPositron,
77+
'streets': cartoPositron,
78+
'outdoors': cartoPositron,
79+
'light': cartoPositron,
80+
'dark': cartoDarkmatter,
81+
'satellite': cartoPositron,
82+
'satellite-streets': cartoPositron,
3083
'open-street-map': {
3184
id: 'osm',
3285
version: 8,
@@ -63,46 +116,8 @@ var stylesMapbox = {
63116
}],
64117
glyphs: 'https://fonts.openmaptiles.org/{fontstack}/{range}.pbf'
65118
},
66-
'carto-positron': {
67-
id: 'carto-positron',
68-
version: 8,
69-
sources: {
70-
'plotly-carto-positron': {
71-
type: 'raster',
72-
attribution: carto,
73-
tiles: ['https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png'],
74-
tileSize: 256
75-
}
76-
},
77-
layers: [{
78-
id: 'plotly-carto-positron',
79-
type: 'raster',
80-
source: 'plotly-carto-positron',
81-
minzoom: 0,
82-
maxzoom: 22
83-
}],
84-
glyphs: 'https://fonts.openmaptiles.org/{fontstack}/{range}.pbf'
85-
},
86-
'carto-darkmatter': {
87-
id: 'carto-darkmatter',
88-
version: 8,
89-
sources: {
90-
'plotly-carto-darkmatter': {
91-
type: 'raster',
92-
attribution: carto,
93-
tiles: ['https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png'],
94-
tileSize: 256
95-
}
96-
},
97-
layers: [{
98-
id: 'plotly-carto-darkmatter',
99-
type: 'raster',
100-
source: 'plotly-carto-darkmatter',
101-
minzoom: 0,
102-
maxzoom: 22
103-
}],
104-
glyphs: 'https://fonts.openmaptiles.org/{fontstack}/{range}.pbf'
105-
},
119+
'carto-positron': cartoPositron,
120+
'carto-darkmatter': cartoDarkmatter,
106121
'stamen-terrain': {
107122
id: 'stamen-terrain',
108123
version: 8,

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.