Added new example styles in the webgl points layer example

This commit is contained in:
Olivier Guyot
2019-10-25 13:45:39 +02:00
parent acf973751b
commit a844691d7b
2 changed files with 40 additions and 0 deletions

View File

@@ -36,6 +36,29 @@ const predefinedStyles = {
rotateWithView: true
}
},
'triangles-latitude': {
symbol: {
symbolType: 'triangle',
size: [
'interpolate',
['linear'],
['get', 'population'],
40000, 12,
2000000, 24
],
color: [
'interpolate',
['linear'],
['get', 'latitude'],
-60, '#ff14c3',
-20, '#ff621d',
20, '#ffed02',
60, '#00ff67'
],
offset: [0, 0],
opacity: 0.95
}
},
'circles': {
symbol: {
symbolType: 'circle',
@@ -57,6 +80,21 @@ const predefinedStyles = {
2000000, 0.92
]
}
},
'circles-zoom': {
symbol: {
symbolType: 'circle',
size: [
'interpolate',
['exponential', 2.5],
['zoom'],
2, 1,
14, 32
],
color: '#240572',
offset: [0, 0],
opacity: 0.95
}
}
};