Skip to content

Commit 7d37f1b

Browse files
authored
Merge pull request #501 from xdev-software/develop
Release
2 parents 2a2417b + f206a6f commit 7d37f1b

36 files changed

+259
-220
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: 🐞 Bug
22
description: Create a bug report for something that is broken
33
labels: [bug]
4+
type: bug
45
body:
56
- type: markdown
67
attributes:

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: ✨ Feature/Enhancement
22
description: Suggest a new feature or enhancement
33
labels: [enhancement]
4+
type: feature
45
body:
56
- type: markdown
67
attributes:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.6.0
2+
* Changed all occurrences of ``Integer`` and ``Double`` to ``Number`` for improved compatibility with Leaflet's API
3+
* Updated OpenStreetMap's Tile-Server address to ``tile.openstreetmap.org`` [openstreetmap/operations#737](https://github.com/openstreetmap/operations/issues/737)
4+
15
## 4.5.0
26
* Added support for [WMS](https://leafletjs.com/reference.html#tilelayer-wms) #486
37
* Updated dependencies

README.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@ To get started it's recommended to have a look at the [demo](./vaadin-maps-leafl
1818
> [!NOTE]
1919
> **The API only supports sending instructions to the client**<br/>
2020
> Due to data integrity retrieving client-side data (that can be modified by users) is not supported.
21-
> * Event listeners can still be registered but this needs to be done manually.<br/>[An example is available in the demo](./vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/EventDemo.java).
21+
>
22+
> Event listeners can still be registered but this needs to be done manually. An example is available [in the demo](./vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/EventDemo.java).
23+
>
24+
> <details><summary>The following code snippet is a simplification of an even more <a href="./vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/ComplexDemo.java#L251">complex example</a> which sends (unvalidated!) client side data back to the server (click to expand)</summary>
25+
>
26+
> ```java
27+
> this.map.on("click", "e => document.getElementById('" + ID + "').$server.mapClicked(e.latlng.lat, e.latng.lng)");
28+
> ...
29+
> @ClientCallable
30+
> public void mapClicked(double lat, double lng)
31+
> {
32+
> LOG.info("Map clicked - lat: {}, lng: {}", lat, lng);
33+
> }
34+
> ```
35+
> </details>
2236
2337
## Installation
2438
[Installation guide of the latest release](https://github.com/xdev-software/vaadin-maps-leaflet-flow/releases/latest#Installation)
@@ -33,6 +47,9 @@ You might have to fine tune your security configuration to allow these.
3347
| --- | --- |
3448
| Vaadin 24+ (latest) | ``3+`` |
3549
50+
### Spring-Boot
51+
* You may have to include ``software/xdev`` inside [``vaadin.allowed-packages``](https://vaadin.com/docs/latest/integrations/spring/configuration#configure-the-scanning-of-packages)
52+
3653
## Run the Demo
3754
* Checkout the repo
3855
* Run ``mvn install && mvn -f vaadin-maps-leaflet-flow-demo spring-boot:run``

pom.xml

Lines changed: 4 additions & 4 deletions
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>
@@ -45,7 +45,7 @@
4545
<dependency>
4646
<groupId>com.puppycrawl.tools</groupId>
4747
<artifactId>checkstyle</artifactId>
48-
<version>10.21.1</version>
48+
<version>10.21.2</version>
4949
</dependency>
5050
</dependencies>
5151
<configuration>
@@ -82,12 +82,12 @@
8282
<dependency>
8383
<groupId>net.sourceforge.pmd</groupId>
8484
<artifactId>pmd-core</artifactId>
85-
<version>7.9.0</version>
85+
<version>7.10.0</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>net.sourceforge.pmd</groupId>
8989
<artifactId>pmd-java</artifactId>
90-
<version>7.9.0</version>
90+
<version>7.10.0</version>
9191
</dependency>
9292
</dependencies>
9393
</plugin>

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

Lines changed: 3 additions & 3 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>
@@ -29,7 +29,7 @@
2929
<mainClass>software.xdev.vaadin.Application</mainClass>
3030

3131
<!-- Dependency-Versions -->
32-
<vaadin.version>24.6.2</vaadin.version>
32+
<vaadin.version>24.6.5</vaadin.version>
3333

3434
<org.springframework.boot.version>3.4.2</org.springframework.boot.version>
3535
</properties>

vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/EventDemo.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ public EventDemo()
5151

5252
final HorizontalLayout hlButtons = new HorizontalLayout();
5353

54+
// !!! NOTE !!!
55+
// A more complex demo which also sends data back from the client to the server
56+
// can be found in ComplexDemo#addEventDemo
57+
5458
// Bind clickFunc to map so that it gets disposed when the map is disposed
5559
final String clickFuncReference = map.clientComponentJsAccessor() + ".myCoolClickFunc";
5660
reg.execJs(clickFuncReference + "=e => alert('You clicked: ' + e.latlng)");

vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/InitialResizeDemo.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ public InitialResizeDemo()
3232
new LLatLng(reg, 50, 11)
3333
);
3434

35-
final MapContainer mapContainer = new MapContainer(reg, map -> {
35+
final MapContainer mapContainer = new MapContainer(
36+
reg, map ->
3637
// This needs to be done after the map was initially resized
3738
// otherwise the view is calculated incorrectly
38-
map.fitBounds(bounds);
39-
});
39+
map.fitBounds(bounds)
40+
);
4041
mapContainer.setSizeFull();
4142
this.add(mapContainer);
4243

vaadin-maps-leaflet-flow/pom.xml

Lines changed: 5 additions & 5 deletions
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>
@@ -49,7 +49,7 @@
4949
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5050

5151
<!-- Dependency-Versions -->
52-
<vaadin.version>24.6.2</vaadin.version>
52+
<vaadin.version>24.6.5</vaadin.version>
5353
</properties>
5454

5555
<dependencyManagement>
@@ -320,7 +320,7 @@
320320
<dependency>
321321
<groupId>com.puppycrawl.tools</groupId>
322322
<artifactId>checkstyle</artifactId>
323-
<version>10.21.1</version>
323+
<version>10.21.2</version>
324324
</dependency>
325325
</dependencies>
326326
<configuration>
@@ -357,12 +357,12 @@
357357
<dependency>
358358
<groupId>net.sourceforge.pmd</groupId>
359359
<artifactId>pmd-core</artifactId>
360-
<version>7.9.0</version>
360+
<version>7.10.0</version>
361361
</dependency>
362362
<dependency>
363363
<groupId>net.sourceforge.pmd</groupId>
364364
<artifactId>pmd-java</artifactId>
365-
<version>7.9.0</version>
365+
<version>7.10.0</version>
366366
</dependency>
367367
</dependencies>
368368
</plugin>

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();

0 commit comments

Comments
 (0)