summaryrefslogtreecommitdiff
path: root/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/layers/FillLayer.java
blob: 7938af3c80336e2f9654d8b6e2b31e886eb988d5 (plain)
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// This file is generated. Edit android/platform/scripts/generate-style-code.js, then run `make style-code-android`.
package com.mapbox.mapboxsdk.style.layers;

/**
 * Fill Layer
 */
public class FillLayer extends Layer {

    public FillLayer(long nativePtr) {
        super(nativePtr);
    }

    public FillLayer(String layerId, String sourceId) {
        initialize(layerId, sourceId);
    }

    protected native void initialize(String layerId, String sourceId);

    public void setSourceLayer(String sourceLayer) {
        checkValidity();
        nativeSetSourceLayer(sourceLayer);
    }

    public void setFilter(Filter.Statement filter) {
        checkValidity();
        this.setFilter(filter.toArray());
    }

    public void setFilter(Object[] filter) {
        checkValidity();
        nativeSetFilter(filter);
    }


    // Property getters

    @SuppressWarnings("unchecked")
    public PropertyValue<Boolean> getFillAntialias() {
        checkValidity();
        return (PropertyValue<Boolean>) new PropertyValue(nativeGetFillAntialias());
    }

    @SuppressWarnings("unchecked")
    public PropertyValue<Float> getFillOpacity() {
        checkValidity();
        return (PropertyValue<Float>) new PropertyValue(nativeGetFillOpacity());
    }

    @SuppressWarnings("unchecked")
    public PropertyValue<String> getFillColor() {
        checkValidity();
        return (PropertyValue<String>) new PropertyValue(nativeGetFillColor());
    }

    @SuppressWarnings("unchecked")
    public PropertyValue<String> getFillOutlineColor() {
        checkValidity();
        return (PropertyValue<String>) new PropertyValue(nativeGetFillOutlineColor());
    }

    @SuppressWarnings("unchecked")
    public PropertyValue<Float[]> getFillTranslate() {
        checkValidity();
        return (PropertyValue<Float[]>) new PropertyValue(nativeGetFillTranslate());
    }

    @SuppressWarnings("unchecked")
    public PropertyValue<String> getFillTranslateAnchor() {
        checkValidity();
        return (PropertyValue<String>) new PropertyValue(nativeGetFillTranslateAnchor());
    }

    @SuppressWarnings("unchecked")
    public PropertyValue<String> getFillPattern() {
        checkValidity();
        return (PropertyValue<String>) new PropertyValue(nativeGetFillPattern());
    }

    private native Object nativeGetFillAntialias();

    private native Object nativeGetFillOpacity();

    private native Object nativeGetFillColor();

    private native Object nativeGetFillOutlineColor();

    private native Object nativeGetFillTranslate();

    private native Object nativeGetFillTranslateAnchor();

    private native Object nativeGetFillPattern();

}