Skip to content

Commit

Permalink
Merge pull request #488 from xdev-software/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
AB-xdev authored Jan 24, 2025
2 parents 0e0ec0b + a643707 commit 80aa6e5
Show file tree
Hide file tree
Showing 23 changed files with 504 additions and 178 deletions.
7 changes: 7 additions & 0 deletions .config/pmd/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,12 @@
<exclude name="UseStringBufferForStringAppends"/>
</rule>

<rule ref="category/java/performance.xml/TooFewBranchesForSwitch">
<properties>
<!-- If you have one case only please use a if -->
<property name="minimumNumberCaseForASwitch" value="2"/>
</properties>
</rule>

<rule ref="category/java/security.xml"/>
</ruleset>
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
contact_links:
- name: 🍃 Leaflet docs
url: https://leafletjs.com/reference.html
about: "Consolidate this when you have questions about Leaflet itself (and not our Vaadin component)"
- name: 💬 Contact support
url: https://xdev.software/en/services/support
about: "If you need support as soon as possible or/and you can't wait for any pull request"
5 changes: 4 additions & 1 deletion .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,17 @@ permissions:
jobs:
link-checker:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

- run: mv .github/.lycheeignore .lycheeignore

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1
uses: lycheeverse/lychee-action@v2
with:
fail: false # Don't fail on broken links, create an issue instead

- name: Find already existing issue
id: find-issue
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ env:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
matrix:
Expand Down Expand Up @@ -73,6 +74,7 @@ jobs:
checkstyle:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
timeout-minutes: 15

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

strategy:
matrix:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:
jobs:
check-code:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -48,6 +49,7 @@ jobs:
prepare-release:
runs-on: ubuntu-latest
needs: [check-code]
timeout-minutes: 10
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
Expand Down Expand Up @@ -112,6 +114,7 @@ jobs:
publish-maven:
runs-on: ubuntu-latest
needs: [prepare-release]
timeout-minutes: 60
steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -143,6 +146,7 @@ jobs:
publish-pages:
runs-on: ubuntu-latest
needs: [prepare-release]
timeout-minutes: 15
steps:
- uses: actions/checkout@v4

Expand All @@ -168,10 +172,12 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./${{ env.PRIMARY_MAVEN_MODULE }}/target/site
force_orphan: true

after-release:
runs-on: ubuntu-latest
needs: [publish-maven]
timeout-minutes: 10
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
token-check:
runs-on: ubuntu-latest
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }}
timeout-minutes: 5
outputs:
hasToken: ${{ steps.check-token.outputs.has }}
steps:
Expand All @@ -40,6 +41,7 @@ jobs:
runs-on: ubuntu-latest
needs: token-check
if: ${{ needs.token-check.outputs.hasToken }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sync-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:
jobs:
labels:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
jobs:
publish-maven:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/update-from-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ permissions:
jobs:
update:
runs-on: ubuntu-latest
timeout-minutes: 60
outputs:
update_branch_merged_commit: ${{ steps.manage-branches.outputs.update_branch_merged_commit }}
create_update_branch_merged_pr: ${{ steps.manage-branches.outputs.create_update_branch_merged_pr }}
Expand Down Expand Up @@ -180,6 +181,7 @@ jobs:
needs: [update]
if: needs.update.outputs.create_update_branch_merged_pr == 1
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .idea/checkstyle-idea.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion .idea/saveactions_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.5.0
* Added support for [WMS](https://leafletjs.com/reference.html#tilelayer-wms) #486
* Updated dependencies

## 4.4.0
* Added support for [GeoJSON](https://leafletjs.com/reference.html#geojson) and [FeatureGroup](https://leafletjs.com/reference.html#featuregroup) #438
* Add "draggable" property to LMarkerOptions #413 (thanks to @ChristianHoesel)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ To get started it's recommended to have a look at the [demo](./vaadin-maps-leafl
## Installation
[Installation guide of the latest release](https://github.com/xdev-software/vaadin-maps-leaflet-flow/releases/latest#Installation)

#### Static resources
Please note that Leaflet uses a few default icons for various components (e.g. Markers).<br/>
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/>
You might have to fine tune your security configuration to allow these.

#### Compatibility with Vaadin
| Vaadin version | vaadin-maps-leaflet-flow version |
| --- | --- |
Expand Down
14 changes: 7 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>software.xdev</groupId>
<artifactId>vaadin-maps-leaflet-flow-root</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.5.0-SNAPSHOT</version>
<packaging>pom</packaging>

<organization>
Expand Down Expand Up @@ -40,12 +40,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.18.1</version>
<version>10.21.1</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -70,7 +70,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.25.0</version>
<version>3.26.0</version>
<configuration>
<includeTests>true</includeTests>
<printFailingErrors>true</printFailingErrors>
Expand All @@ -82,12 +82,12 @@
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>7.5.0</version>
<version>7.9.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>7.5.0</version>
<version>7.9.0</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -99,7 +99,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.5.0</version>
<version>3.6.0</version>
</plugin>
</plugins>
</reporting>
Expand Down
20 changes: 16 additions & 4 deletions vaadin-maps-leaflet-flow-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>software.xdev</groupId>
<artifactId>vaadin-maps-leaflet-flow-root</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.5.0-SNAPSHOT</version>
</parent>

<artifactId>vaadin-maps-leaflet-flow-demo</artifactId>
<version>4.4.1-SNAPSHOT</version>
<version>4.5.0-SNAPSHOT</version>
<packaging>jar</packaging>

<organization>
Expand All @@ -29,9 +29,9 @@
<mainClass>software.xdev.vaadin.Application</mainClass>

<!-- Dependency-Versions -->
<vaadin.version>24.4.11</vaadin.version>
<vaadin.version>24.6.2</vaadin.version>

<org.springframework.boot.version>3.3.3</org.springframework.boot.version>
<org.springframework.boot.version>3.4.2</org.springframework.boot.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -61,6 +61,12 @@
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-core</artifactId>
<exclusions>
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>hilla-dev</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>software.xdev</groupId>
Expand All @@ -72,6 +78,12 @@
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>com.vaadin</groupId>
<artifactId>hilla</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Temporarily excluded by Vaadin due to "security vulnerability" -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import software.xdev.vaadin.maps.leaflet.layer.LLayerGroup;
import software.xdev.vaadin.maps.leaflet.layer.raster.LImageOverlay;
import software.xdev.vaadin.maps.leaflet.layer.raster.LTileLayer;
import software.xdev.vaadin.maps.leaflet.layer.raster.LTileLayerWMS;
import software.xdev.vaadin.maps.leaflet.layer.raster.LTileLayerWMSOptions;
import software.xdev.vaadin.maps.leaflet.layer.raster.LVideoOverlay;
import software.xdev.vaadin.maps.leaflet.layer.raster.LVideoOverlayOptions;
import software.xdev.vaadin.maps.leaflet.layer.ui.LMarker;
Expand Down Expand Up @@ -89,9 +91,26 @@ public ComplexDemo()
"https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png",
16,
"Map data: &copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors, <a "
+ "href=\"http://viewfinderpanoramas.org\">SRTM</a> | Map style: &copy; <a href=\"https://opentopomap"
+ "href=\"https://viewfinderpanoramas.org\">SRTM</a> | Map style: &copy; <a href=\"https://opentopomap"
+ ".org\">OpenTopoMap</a> (<a href=\"https://creativecommons.org/licenses/by-sa/3.0/\">CC-BY-SA</a>"
);
final LTileLayerWMS tlWMS = new LTileLayerWMS(
this.reg,
"https://ows.mundialis.de/services/service?",
"TOPO-WMS,OSM-Overlay-WMS",
11,
"&copy; <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors, "
+ "<a href=\"https://www.terrestris.de/en/demos/\">Terrestris/Mundialis</a>"
);
final LTileLayerWMS tlWMSUSWeatherData = new LTileLayerWMS(
this.reg,
"https://mesonet.agron.iastate.edu/cgi-bin/wms/nexrad/n0r.cgi",
new LTileLayerWMSOptions()
.withLayers("nexrad-n0r-900913")
.withFormat("image/png")
.withTransparent(true)
.withAttribution("Weather data © 2012 IEM Nexrad")
);

final LDivIcon divIconInfo = new LDivIcon(this.reg, new LDivIconOptions()
.withHtml("""
Expand Down Expand Up @@ -177,7 +196,7 @@ public ComplexDemo()
.addLayer(tlOSM)
.addLayer(lLayerGroupPlaces);

this.addControls(tlOSM, tlOSMHOT, tlTopo, lLayerGroupPlaces, lLayerGroupFood);
this.addControls(tlOSM, tlOSMHOT, tlTopo, tlWMS, lLayerGroupPlaces, lLayerGroupFood, tlWMSUSWeatherData);

this.hlButtons.setWidthFull();
this.add(this.hlButtons);
Expand All @@ -198,20 +217,24 @@ private void addControls(
final LTileLayer tlOSM,
final LTileLayer tlOSMHOT,
final LTileLayer tlTopo,
final LTileLayerWMS tlWMS,
final LLayerGroup lLayerGroupPlaces,
final LLayerGroup lLayerGroupFood)
final LLayerGroup lLayerGroupFood,
final LTileLayerWMS tlWMSUSWeatherData)
{
// Use LinkedHashMap for order
final LinkedHashMap<String, LLayer<?>> baseLayers = new LinkedHashMap<>();
baseLayers.put("OSM", tlOSM);
baseLayers.put("OSM HOT", tlOSMHOT);
baseLayers.put("TOPO", tlTopo);
baseLayers.put("WMS", tlWMS);
final LControlLayers lControlLayers = new LControlLayers(
this.reg,
baseLayers,
new LControlLayersOptions().withCollapsed(false))
.addOverlay(lLayerGroupPlaces, "Places")
.addOverlay(lLayerGroupFood, "Food")
.addOverlay(tlWMSUSWeatherData, "US Weather data")
.addTo(this.map);
// Apply manual patch for https://github.com/Leaflet/Leaflet/issues/9009 as this was not released yet
this.map.on(
Expand Down
Loading

0 comments on commit 80aa6e5

Please sign in to comment.