Skip to content

Commit f891b5e

Browse files
committed
Changed all occurrences of Integer and Double to Number for improved compatibility with Leaflet's API
Fixes #499
1 parent 151c692 commit f891b5e

27 files changed

+215
-206
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 4.6.0
2+
* Changed all occurrences of ``Integer`` and ``Double`` to ``Number`` for improved compatibility with Leaflet's API
3+
14
## 4.5.0
25
* Added support for [WMS](https://leafletjs.com/reference.html#tilelayer-wms) #486
36
* Updated dependencies

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.xdev</groupId>
88
<artifactId>vaadin-maps-leaflet-flow-root</artifactId>
9-
<version>4.5.1-SNAPSHOT</version>
9+
<version>4.6.0-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>

vaadin-maps-leaflet-flow-demo/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<parent>
88
<groupId>software.xdev</groupId>
99
<artifactId>vaadin-maps-leaflet-flow-root</artifactId>
10-
<version>4.5.1-SNAPSHOT</version>
10+
<version>4.6.0-SNAPSHOT</version>
1111
</parent>
1212

1313
<artifactId>vaadin-maps-leaflet-flow-demo</artifactId>
14-
<version>4.5.1-SNAPSHOT</version>
14+
<version>4.6.0-SNAPSHOT</version>
1515
<packaging>jar</packaging>
1616

1717
<organization>

vaadin-maps-leaflet-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<groupId>software.xdev</groupId>
88
<artifactId>vaadin-maps-leaflet-flow</artifactId>
9-
<version>4.5.1-SNAPSHOT</version>
9+
<version>4.6.0-SNAPSHOT</version>
1010
<packaging>jar</packaging>
1111

1212
<name>vaadin-maps-leaflet-flow</name>

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/base/has/LHasOpacity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
public interface LHasOpacity<S extends LHasOpacity<S>> extends LComponent<S>
2222
{
23-
default S setOpacity(final Double opacity)
23+
default S setOpacity(final Number opacity)
2424
{
2525
this.invokeSelf(".setOpacity($0)", opacity);
2626
return this.self();

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/base/has/LHasSetZIndex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
public interface LHasSetZIndex<S extends LHasSetZIndex<S>> extends LComponent<S>
2222
{
23-
default S setZIndex(final Integer zIndex)
23+
default S setZIndex(final Number zIndex)
2424
{
2525
this.invokeSelf(".setZIndex($0)", zIndex);
2626
return this.self();

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/controls/LControlScaleOptions.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@
2020
*/
2121
public class LControlScaleOptions extends LControlOptions<LControlScaleOptions>
2222
{
23-
private Integer maxWidth;
23+
private Number maxWidth;
2424
private Boolean metric;
2525
private Boolean imperial;
2626
private Boolean updateWhenIdle;
2727

28-
public Integer getMaxWidth()
28+
public Number getMaxWidth()
2929
{
3030
return this.maxWidth;
3131
}
3232

33-
public void setMaxWidth(final Integer maxWidth)
33+
public void setMaxWidth(final Number maxWidth)
3434
{
3535
this.maxWidth = maxWidth;
3636
}
3737

38-
public LControlScaleOptions withMaxWidth(final Integer maxWidth)
38+
public LControlScaleOptions withMaxWidth(final Number maxWidth)
3939
{
4040
this.setMaxWidth(maxWidth);
4141
return this.self();

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LAbstractImageOverlayOptions.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,29 @@
1515
*/
1616
package software.xdev.vaadin.maps.leaflet.layer;
1717

18+
@SuppressWarnings("unused")
1819
public abstract class LAbstractImageOverlayOptions<S extends LAbstractImageOverlayOptions<S>>
1920
extends LInteractiveLayerOptions<S>
2021
{
21-
private Double opacity;
22+
private Number opacity;
2223
private String alt;
2324
// Boolean|String
2425
private Object crossOrigin;
2526
private String errorOverlayUrl;
26-
private Integer zIndex;
27+
private Number zIndex;
2728
private String className;
2829

29-
public Double getOpacity()
30+
public Number getOpacity()
3031
{
3132
return this.opacity;
3233
}
3334

34-
public void setOpacity(final Double opacity)
35+
public void setOpacity(final Number opacity)
3536
{
3637
this.opacity = opacity;
3738
}
3839

39-
public S withOpacity(final Double opacity)
40+
public S withOpacity(final Number opacity)
4041
{
4142
this.setOpacity(opacity);
4243
return this.self();
@@ -90,17 +91,17 @@ public S withErrorOverlayUrl(final String errorOverlayUrl)
9091
return this.self();
9192
}
9293

93-
public Integer getzIndex()
94+
public Number getzIndex()
9495
{
9596
return this.zIndex;
9697
}
9798

98-
public void setzIndex(final Integer zIndex)
99+
public void setzIndex(final Number zIndex)
99100
{
100101
this.zIndex = zIndex;
101102
}
102103

103-
public S withZIndex(final Integer zIndex)
104+
public S withZIndex(final Number zIndex)
104105
{
105106
this.setzIndex(zIndex);
106107
return this.self();

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LGridLayerOptions.java

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ public abstract class LGridLayerOptions<S extends LGridLayerOptions<S>> extends
2525
{
2626
// Number|Point
2727
private Object tileSize;
28-
private Double opacity;
28+
private Number opacity;
2929
private Boolean updateWhenIdle;
3030
private Boolean updateWhenZooming;
31-
private Integer updateInterval;
32-
private Integer zIndex;
31+
private Number updateInterval;
32+
private Number zIndex;
3333
private LLatLngBounds latLngBounds;
34-
private Integer minZoom;
35-
private Integer maxZoom;
36-
private Integer minNativeZoom;
37-
private Integer maxNativeZoom;
34+
private Number minZoom;
35+
private Number maxZoom;
36+
private Number minNativeZoom;
37+
private Number maxNativeZoom;
3838
private Boolean noWrap;
3939
private String className;
40-
private Integer keepBuffer;
40+
private Number keepBuffer;
4141

4242
public Object getTileSize()
4343
{
@@ -55,17 +55,17 @@ public S withTileSize(final Object tileSize)
5555
return this.self();
5656
}
5757

58-
public Double getOpacity()
58+
public Number getOpacity()
5959
{
6060
return this.opacity;
6161
}
6262

63-
public void setOpacity(final Double opacity)
63+
public void setOpacity(final Number opacity)
6464
{
6565
this.opacity = opacity;
6666
}
6767

68-
public S withOpacity(final Double opacity)
68+
public S withOpacity(final Number opacity)
6969
{
7070
this.setOpacity(opacity);
7171
return this.self();
@@ -103,33 +103,33 @@ public S withUpdateWhenZooming(final Boolean updateWhenZooming)
103103
return this.self();
104104
}
105105

106-
public Integer getUpdateInterval()
106+
public Number getUpdateInterval()
107107
{
108108
return this.updateInterval;
109109
}
110110

111-
public void setUpdateInterval(final Integer updateInterval)
111+
public void setUpdateInterval(final Number updateInterval)
112112
{
113113
this.updateInterval = updateInterval;
114114
}
115115

116-
public S withUpdateInterval(final Integer updateInterval)
116+
public S withUpdateInterval(final Number updateInterval)
117117
{
118118
this.setUpdateInterval(updateInterval);
119119
return this.self();
120120
}
121121

122-
public Integer getzIndex()
122+
public Number getzIndex()
123123
{
124124
return this.zIndex;
125125
}
126126

127-
public void setzIndex(final Integer zIndex)
127+
public void setzIndex(final Number zIndex)
128128
{
129129
this.zIndex = zIndex;
130130
}
131131

132-
public S withZIndex(final Integer zIndex)
132+
public S withZIndex(final Number zIndex)
133133
{
134134
this.setzIndex(zIndex);
135135
return this.self();
@@ -151,65 +151,65 @@ public S withLatLngBounds(final LLatLngBounds latLngBounds)
151151
return this.self();
152152
}
153153

154-
public Integer getMinZoom()
154+
public Number getMinZoom()
155155
{
156156
return this.minZoom;
157157
}
158158

159-
public void setMinZoom(final Integer minZoom)
159+
public void setMinZoom(final Number minZoom)
160160
{
161161
this.minZoom = minZoom;
162162
}
163163

164-
public S withMinZoom(final Integer minZoom)
164+
public S withMinZoom(final Number minZoom)
165165
{
166166
this.setMinZoom(minZoom);
167167
return this.self();
168168
}
169169

170-
public Integer getMaxZoom()
170+
public Number getMaxZoom()
171171
{
172172
return this.maxZoom;
173173
}
174174

175-
public void setMaxZoom(final Integer maxZoom)
175+
public void setMaxZoom(final Number maxZoom)
176176
{
177177
this.maxZoom = maxZoom;
178178
}
179179

180-
public S withMaxZoom(final Integer maxZoom)
180+
public S withMaxZoom(final Number maxZoom)
181181
{
182182
this.setMaxZoom(maxZoom);
183183
return this.self();
184184
}
185185

186-
public Integer getMinNativeZoom()
186+
public Number getMinNativeZoom()
187187
{
188188
return this.minNativeZoom;
189189
}
190190

191-
public void setMinNativeZoom(final Integer minNativeZoom)
191+
public void setMinNativeZoom(final Number minNativeZoom)
192192
{
193193
this.minNativeZoom = minNativeZoom;
194194
}
195195

196-
public S withMinNativeZoom(final Integer minNativeZoom)
196+
public S withMinNativeZoom(final Number minNativeZoom)
197197
{
198198
this.setMinNativeZoom(minNativeZoom);
199199
return this.self();
200200
}
201201

202-
public Integer getMaxNativeZoom()
202+
public Number getMaxNativeZoom()
203203
{
204204
return this.maxNativeZoom;
205205
}
206206

207-
public void setMaxNativeZoom(final Integer maxNativeZoom)
207+
public void setMaxNativeZoom(final Number maxNativeZoom)
208208
{
209209
this.maxNativeZoom = maxNativeZoom;
210210
}
211211

212-
public S withMaxNativeZoom(final Integer maxNativeZoom)
212+
public S withMaxNativeZoom(final Number maxNativeZoom)
213213
{
214214
this.setMaxNativeZoom(maxNativeZoom);
215215
return this.self();
@@ -247,17 +247,17 @@ public S withClassName(final String className)
247247
return this.self();
248248
}
249249

250-
public Integer getKeepBuffer()
250+
public Number getKeepBuffer()
251251
{
252252
return this.keepBuffer;
253253
}
254254

255-
public void setKeepBuffer(final Integer keepBuffer)
255+
public void setKeepBuffer(final Number keepBuffer)
256256
{
257257
this.keepBuffer = keepBuffer;
258258
}
259259

260-
public S withKeepBuffer(final Integer keepBuffer)
260+
public S withKeepBuffer(final Number keepBuffer)
261261
{
262262
this.setKeepBuffer(keepBuffer);
263263
return this.self();

vaadin-maps-leaflet-flow/src/main/java/software/xdev/vaadin/maps/leaflet/layer/LLayerOptions.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
*/
2424
public abstract class LLayerOptions<S extends LLayerOptions<S>> implements LComponentOptions<S>
2525
{
26-
String pane;
27-
String attribution;
26+
private String pane;
27+
private String attribution;
2828

2929
public String getPane()
3030
{

0 commit comments

Comments
 (0)