1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
// Create the renderer and configure visual variablesconst renderer = {
type: "simple", // autocasts as new SimpleRenderer()// Add a default MeshSymbol3D. The color will be determined// by the visual variablessymbol: {
type: "mesh-3d",
symbolLayers: [
{
type: "fill",
material: {
color: "#ffffff",
colorMixMode: "replace" },
edges: {
type: "solid",
color: [0, 0, 0, 0.6],
size: 1.5 }
}
]
},
visualVariables: [
{
// specifies a visual variable of continuous colortype: "color",
// based on a field indicating the walking time to public transportfield: "walkTimeToStopsInService",
legendOptions: {
title: "Walking time to public transport" },
// color ramp from white to blue// based on the walking time to public transport.// Buildings will be assigned a color proportional to the// min and max colors specified below.stops: [
{
value: 1,
color: "#2887a1",
label: "less than 1 minute" },
{
value: 15,
color: "#ffffff",
label: "more than 15 minutes" }
]
}
]
};