Skip to content

Commit 80aa6e5

Browse files
authored
Merge pull request #488 from xdev-software/develop
Release
2 parents 0e0ec0b + a643707 commit 80aa6e5

File tree

23 files changed

+504
-178
lines changed

23 files changed

+504
-178
lines changed

.config/pmd/ruleset.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,5 +151,12 @@
151151
<exclude name="UseStringBufferForStringAppends"/>
152152
</rule>
153153

154+
<rule ref="category/java/performance.xml/TooFewBranchesForSwitch">
155+
<properties>
156+
<!-- If you have one case only please use a if -->
157+
<property name="minimumNumberCaseForASwitch" value="2"/>
158+
</properties>
159+
</rule>
160+
154161
<rule ref="category/java/security.xml"/>
155162
</ruleset>

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
contact_links:
2+
- name: 🍃 Leaflet docs
3+
url: https://leafletjs.com/reference.html
4+
about: "Consolidate this when you have questions about Leaflet itself (and not our Vaadin component)"
25
- name: 💬 Contact support
36
url: https://xdev.software/en/services/support
47
about: "If you need support as soon as possible or/and you can't wait for any pull request"

.github/workflows/broken-links.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,17 @@ permissions:
1111
jobs:
1212
link-checker:
1313
runs-on: ubuntu-latest
14+
timeout-minutes: 15
1415
steps:
1516
- uses: actions/checkout@v4
1617

1718
- run: mv .github/.lycheeignore .lycheeignore
1819

1920
- name: Link Checker
2021
id: lychee
21-
uses: lycheeverse/lychee-action@v1
22+
uses: lycheeverse/lychee-action@v2
23+
with:
24+
fail: false # Don't fail on broken links, create an issue instead
2225

2326
- name: Find already existing issue
2427
id: find-issue

.github/workflows/check-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ env:
2626
jobs:
2727
build:
2828
runs-on: ubuntu-latest
29+
timeout-minutes: 30
2930

3031
strategy:
3132
matrix:
@@ -73,6 +74,7 @@ jobs:
7374
checkstyle:
7475
runs-on: ubuntu-latest
7576
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
77+
timeout-minutes: 15
7678

7779
strategy:
7880
matrix:
@@ -95,6 +97,7 @@ jobs:
9597
pmd:
9698
runs-on: ubuntu-latest
9799
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
100+
timeout-minutes: 15
98101

99102
strategy:
100103
matrix:

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414
jobs:
1515
check-code:
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 30
1718
steps:
1819
- uses: actions/checkout@v4
1920

@@ -48,6 +49,7 @@ jobs:
4849
prepare-release:
4950
runs-on: ubuntu-latest
5051
needs: [check-code]
52+
timeout-minutes: 10
5153
outputs:
5254
upload_url: ${{ steps.create_release.outputs.upload_url }}
5355
steps:
@@ -112,6 +114,7 @@ jobs:
112114
publish-maven:
113115
runs-on: ubuntu-latest
114116
needs: [prepare-release]
117+
timeout-minutes: 60
115118
steps:
116119
- uses: actions/checkout@v4
117120

@@ -143,6 +146,7 @@ jobs:
143146
publish-pages:
144147
runs-on: ubuntu-latest
145148
needs: [prepare-release]
149+
timeout-minutes: 15
146150
steps:
147151
- uses: actions/checkout@v4
148152

@@ -168,10 +172,12 @@ jobs:
168172
with:
169173
github_token: ${{ secrets.GITHUB_TOKEN }}
170174
publish_dir: ./${{ env.PRIMARY_MAVEN_MODULE }}/target/site
175+
force_orphan: true
171176

172177
after-release:
173178
runs-on: ubuntu-latest
174179
needs: [publish-maven]
180+
timeout-minutes: 10
175181
steps:
176182
- uses: actions/checkout@v4
177183

.github/workflows/sonar.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
token-check:
2828
runs-on: ubuntu-latest
2929
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }}
30+
timeout-minutes: 5
3031
outputs:
3132
hasToken: ${{ steps.check-token.outputs.has }}
3233
steps:
@@ -40,6 +41,7 @@ jobs:
4041
runs-on: ubuntu-latest
4142
needs: token-check
4243
if: ${{ needs.token-check.outputs.hasToken }}
44+
timeout-minutes: 30
4345
steps:
4446
- uses: actions/checkout@v4
4547
with:

.github/workflows/sync-labels.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ permissions:
1414
jobs:
1515
labels:
1616
runs-on: ubuntu-latest
17+
timeout-minutes: 10
1718
steps:
1819
- uses: actions/checkout@v4
1920
with:

.github/workflows/test-deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ env:
99
jobs:
1010
publish-maven:
1111
runs-on: ubuntu-latest
12+
timeout-minutes: 60
1213
steps:
1314
- uses: actions/checkout@v4
1415

.github/workflows/update-from-template.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ permissions:
3131
jobs:
3232
update:
3333
runs-on: ubuntu-latest
34+
timeout-minutes: 60
3435
outputs:
3536
update_branch_merged_commit: ${{ steps.manage-branches.outputs.update_branch_merged_commit }}
3637
create_update_branch_merged_pr: ${{ steps.manage-branches.outputs.create_update_branch_merged_pr }}
@@ -180,6 +181,7 @@ jobs:
180181
needs: [update]
181182
if: needs.update.outputs.create_update_branch_merged_pr == 1
182183
runs-on: ubuntu-latest
184+
timeout-minutes: 60
183185
steps:
184186
- uses: actions/checkout@v4
185187
with:

.idea/checkstyle-idea.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/saveactions_settings.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 4.5.0
2+
* Added support for [WMS](https://leafletjs.com/reference.html#tilelayer-wms) #486
3+
* Updated dependencies
4+
15
## 4.4.0
26
* Added support for [GeoJSON](https://leafletjs.com/reference.html#geojson) and [FeatureGroup](https://leafletjs.com/reference.html#featuregroup) #438
37
* Add "draggable" property to LMarkerOptions #413 (thanks to @ChristianHoesel)

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ To get started it's recommended to have a look at the [demo](./vaadin-maps-leafl
2323
## Installation
2424
[Installation guide of the latest release](https://github.com/xdev-software/vaadin-maps-leaflet-flow/releases/latest#Installation)
2525

26+
#### Static resources
27+
Please note that Leaflet uses a few default icons for various components (e.g. Markers).<br/>
28+
These are also shipped with the library and can be found inside [``META-INF/resources``](./vaadin-maps-leaflet-flow/src/main/resources/META-INF/resources/).<br/>
29+
You might have to fine tune your security configuration to allow these.
30+
2631
#### Compatibility with Vaadin
2732
| Vaadin version | vaadin-maps-leaflet-flow version |
2833
| --- | --- |

pom.xml

Lines changed: 7 additions & 7 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.4.1-SNAPSHOT</version>
9+
<version>4.5.0-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>
@@ -40,12 +40,12 @@
4040
<plugin>
4141
<groupId>org.apache.maven.plugins</groupId>
4242
<artifactId>maven-checkstyle-plugin</artifactId>
43-
<version>3.5.0</version>
43+
<version>3.6.0</version>
4444
<dependencies>
4545
<dependency>
4646
<groupId>com.puppycrawl.tools</groupId>
4747
<artifactId>checkstyle</artifactId>
48-
<version>10.18.1</version>
48+
<version>10.21.1</version>
4949
</dependency>
5050
</dependencies>
5151
<configuration>
@@ -70,7 +70,7 @@
7070
<plugin>
7171
<groupId>org.apache.maven.plugins</groupId>
7272
<artifactId>maven-pmd-plugin</artifactId>
73-
<version>3.25.0</version>
73+
<version>3.26.0</version>
7474
<configuration>
7575
<includeTests>true</includeTests>
7676
<printFailingErrors>true</printFailingErrors>
@@ -82,12 +82,12 @@
8282
<dependency>
8383
<groupId>net.sourceforge.pmd</groupId>
8484
<artifactId>pmd-core</artifactId>
85-
<version>7.5.0</version>
85+
<version>7.9.0</version>
8686
</dependency>
8787
<dependency>
8888
<groupId>net.sourceforge.pmd</groupId>
8989
<artifactId>pmd-java</artifactId>
90-
<version>7.5.0</version>
90+
<version>7.9.0</version>
9191
</dependency>
9292
</dependencies>
9393
</plugin>
@@ -99,7 +99,7 @@
9999
<plugin>
100100
<groupId>org.apache.maven.plugins</groupId>
101101
<artifactId>maven-jxr-plugin</artifactId>
102-
<version>3.5.0</version>
102+
<version>3.6.0</version>
103103
</plugin>
104104
</plugins>
105105
</reporting>

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

Lines changed: 16 additions & 4 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.4.1-SNAPSHOT</version>
10+
<version>4.5.0-SNAPSHOT</version>
1111
</parent>
1212

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

1717
<organization>
@@ -29,9 +29,9 @@
2929
<mainClass>software.xdev.vaadin.Application</mainClass>
3030

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

34-
<org.springframework.boot.version>3.3.3</org.springframework.boot.version>
34+
<org.springframework.boot.version>3.4.2</org.springframework.boot.version>
3535
</properties>
3636

3737
<dependencyManagement>
@@ -61,6 +61,12 @@
6161
<dependency>
6262
<groupId>com.vaadin</groupId>
6363
<artifactId>vaadin-core</artifactId>
64+
<exclusions>
65+
<exclusion>
66+
<groupId>com.vaadin</groupId>
67+
<artifactId>hilla-dev</artifactId>
68+
</exclusion>
69+
</exclusions>
6470
</dependency>
6571
<dependency>
6672
<groupId>software.xdev</groupId>
@@ -72,6 +78,12 @@
7278
<dependency>
7379
<groupId>com.vaadin</groupId>
7480
<artifactId>vaadin-spring-boot-starter</artifactId>
81+
<exclusions>
82+
<exclusion>
83+
<groupId>com.vaadin</groupId>
84+
<artifactId>hilla</artifactId>
85+
</exclusion>
86+
</exclusions>
7587
</dependency>
7688
<!-- Temporarily excluded by Vaadin due to "security vulnerability" -->
7789
<dependency>

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

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
import software.xdev.vaadin.maps.leaflet.layer.LLayerGroup;
3434
import software.xdev.vaadin.maps.leaflet.layer.raster.LImageOverlay;
3535
import software.xdev.vaadin.maps.leaflet.layer.raster.LTileLayer;
36+
import software.xdev.vaadin.maps.leaflet.layer.raster.LTileLayerWMS;
37+
import software.xdev.vaadin.maps.leaflet.layer.raster.LTileLayerWMSOptions;
3638
import software.xdev.vaadin.maps.leaflet.layer.raster.LVideoOverlay;
3739
import software.xdev.vaadin.maps.leaflet.layer.raster.LVideoOverlayOptions;
3840
import software.xdev.vaadin.maps.leaflet.layer.ui.LMarker;
@@ -89,9 +91,26 @@ public ComplexDemo()
8991
"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
9092
16,
9193
"Map data: &copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors, <a "
92-
+ "href=\"http://viewfinderpanoramas.org\">SRTM</a> | Map style: &copy; <a href=\"https://opentopomap"
94+
+ "href=\"https://viewfinderpanoramas.org\">SRTM</a> | Map style: &copy; <a href=\"https://opentopomap"
9395
+ ".org\">OpenTopoMap</a> (<a href=\"https://creativecommons.org/licenses/by-sa/3.0/\">CC-BY-SA</a>"
9496
);
97+
final LTileLayerWMS tlWMS = new LTileLayerWMS(
98+
this.reg,
99+
"https://ows.mundialis.de/services/service?",
100+
"TOPO-WMS,OSM-Overlay-WMS",
101+
11,
102+
"&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors, "
103+
+ "<a href=\"https://www.terrestris.de/en/demos/\">Terrestris/Mundialis</a>"
104+
);
105+
final LTileLayerWMS tlWMSUSWeatherData = new LTileLayerWMS(
106+
this.reg,
107+
"https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi",
108+
new LTileLayerWMSOptions()
109+
.withLayers("nexrad-n0r-900913")
110+
.withFormat("image/png")
111+
.withTransparent(true)
112+
.withAttribution("Weather data © 2012 IEM Nexrad")
113+
);
95114

96115
final LDivIcon divIconInfo = new LDivIcon(this.reg, new LDivIconOptions()
97116
.withHtml("""
@@ -177,7 +196,7 @@ public ComplexDemo()
177196
.addLayer(tlOSM)
178197
.addLayer(lLayerGroupPlaces);
179198

180-
this.addControls(tlOSM, tlOSMHOT, tlTopo, lLayerGroupPlaces, lLayerGroupFood);
199+
this.addControls(tlOSM, tlOSMHOT, tlTopo, tlWMS, lLayerGroupPlaces, lLayerGroupFood, tlWMSUSWeatherData);
181200

182201
this.hlButtons.setWidthFull();
183202
this.add(this.hlButtons);
@@ -198,20 +217,24 @@ private void addControls(
198217
final LTileLayer tlOSM,
199218
final LTileLayer tlOSMHOT,
200219
final LTileLayer tlTopo,
220+
final LTileLayerWMS tlWMS,
201221
final LLayerGroup lLayerGroupPlaces,
202-
final LLayerGroup lLayerGroupFood)
222+
final LLayerGroup lLayerGroupFood,
223+
final LTileLayerWMS tlWMSUSWeatherData)
203224
{
204225
// Use LinkedHashMap for order
205226
final LinkedHashMap<String, LLayer<?>> baseLayers = new LinkedHashMap<>();
206227
baseLayers.put("OSM", tlOSM);
207228
baseLayers.put("OSM HOT", tlOSMHOT);
208229
baseLayers.put("TOPO", tlTopo);
230+
baseLayers.put("WMS", tlWMS);
209231
final LControlLayers lControlLayers = new LControlLayers(
210232
this.reg,
211233
baseLayers,
212234
new LControlLayersOptions().withCollapsed(false))
213235
.addOverlay(lLayerGroupPlaces, "Places")
214236
.addOverlay(lLayerGroupFood, "Food")
237+
.addOverlay(tlWMSUSWeatherData, "US Weather data")
215238
.addTo(this.map);
216239
// Apply manual patch for https://github.com/Leaflet/Leaflet/issues/9009 as this was not released yet
217240
this.map.on(

0 commit comments

Comments
 (0)