@@ -45,12 +45,14 @@ public abstract class Marker {
45
45
private String label ;
46
46
private Vector3d position ;
47
47
private int sorting ;
48
+ private boolean listed ;
48
49
49
50
public Marker (String type , String label , Vector3d position ) {
50
51
this .type = Objects .requireNonNull (type , "type cannot be null" );
51
52
this .label = Objects .requireNonNull (label , "label cannot be null" );
52
53
this .position = Objects .requireNonNull (position , "position cannot be null" );
53
54
this .sorting = 0 ;
55
+ this .listed = true ;
54
56
}
55
57
56
58
/**
@@ -114,7 +116,7 @@ public void setPosition(double x, double y, double z) {
114
116
* A lower value makes the marker sorted first (in lists and menus), a higher value makes it sorted later.<br>
115
117
* If multiple markers have the same sorting-value, their order will be arbitrary.<br>
116
118
* This value defaults to 0.
117
- * @return This markers sorting-value
119
+ * @return this markers sorting-value
118
120
*/
119
121
public int getSorting () {
120
122
return sorting ;
@@ -131,6 +133,24 @@ public void setSorting(int sorting) {
131
133
this .sorting = sorting ;
132
134
}
133
135
136
+ /**
137
+ * This value defines whether the marker will be listed (true) in markers and lists by the webapp (additionally to being
138
+ * displayed on the map) or not (false).
139
+ * @return whether the marker will be listed or not
140
+ */
141
+ public boolean isListed () {
142
+ return listed ;
143
+ }
144
+
145
+ /**
146
+ * Defines whether the marker will be listed (true) in markers and lists by the webapp (additionally to being
147
+ * displayed on the map) or not (false).
148
+ * @param listed whether the marker will be listed or not
149
+ */
150
+ public void setListed (boolean listed ) {
151
+ this .listed = listed ;
152
+ }
153
+
134
154
@ Override
135
155
public boolean equals (Object o ) {
136
156
if (this == o ) return true ;
@@ -156,6 +176,7 @@ public static abstract class Builder<T extends Marker, B extends Marker.Builder<
156
176
String label ;
157
177
Vector3d position ;
158
178
Integer sorting ;
179
+ Boolean listed ;
159
180
160
181
/**
161
182
* Sets the label of the {@link Marker}.
@@ -201,6 +222,16 @@ public B sorting(Integer sorting) {
201
222
return self ();
202
223
}
203
224
225
+ /**
226
+ * Defines whether the marker will be listed (true) in markers and lists by the webapp (additionally to being
227
+ * displayed on the map) or not (false).
228
+ * @param listed whether the marker will be listed or not
229
+ */
230
+ public B listed (Boolean listed ) {
231
+ this .listed = listed ;
232
+ return self ();
233
+ }
234
+
204
235
/**
205
236
* Creates a new {@link Marker} with the current builder-settings
206
237
* @return The new {@link Marker}-instance
@@ -211,6 +242,7 @@ T build(T marker) {
211
242
if (label != null ) marker .setLabel (label );
212
243
if (position != null ) marker .setPosition (position );
213
244
if (sorting != null ) marker .setSorting (sorting );
245
+ if (listed != null ) marker .setListed (listed );
214
246
return marker ;
215
247
}
216
248
0 commit comments