-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Copy pathfill_style_layer.js
53 lines (44 loc) · 1.87 KB
/
fill_style_layer.js
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
51
52
53
'use strict';
const StyleLayer = require('../style_layer');
const FillBucket = require('../../data/bucket/fill_bucket');
class FillStyleLayer extends StyleLayer {
getPaintValue(name, globalProperties, featureProperties) {
if (name === 'fill-outline-color' && this.getPaintProperty('fill-outline-color') === undefined) {
return super.getPaintValue('fill-color', globalProperties, featureProperties);
} else {
return super.getPaintValue(name, globalProperties, featureProperties);
}
}
getPaintValueStopZoomLevels(name) {
if (name === 'fill-outline-color' && this.getPaintProperty('fill-outline-color') === undefined) {
return super.getPaintValueStopZoomLevels('fill-color');
} else {
return super.getPaintValueStopZoomLevels(name);
}
}
getPaintInterpolationT(name, globalProperties) {
if (name === 'fill-outline-color' && this.getPaintProperty('fill-outline-color') === undefined) {
return super.getPaintInterpolationT('fill-color', globalProperties);
} else {
return super.getPaintInterpolationT(name, globalProperties);
}
}
isPaintValueFeatureConstant(name) {
if (name === 'fill-outline-color' && this.getPaintProperty('fill-outline-color') === undefined) {
return super.isPaintValueFeatureConstant('fill-color');
} else {
return super.isPaintValueFeatureConstant(name);
}
}
isPaintValueZoomConstant(name) {
if (name === 'fill-outline-color' && this.getPaintProperty('fill-outline-color') === undefined) {
return super.isPaintValueZoomConstant('fill-color');
} else {
return super.isPaintValueZoomConstant(name);
}
}
createBucket(options) {
return new FillBucket(options);
}
}
module.exports = FillStyleLayer;