Skip to content

Commit edbe40a

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents fb13663 + 6b44b2b commit edbe40a

File tree

126 files changed

+9506
-35
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+9506
-35
lines changed

.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: Leaflet
2+
open_collective: leafletjs

.github/ISSUE_TEMPLATE/bug_report.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ body:
1515
attributes:
1616
label: "Checklist"
1717
options:
18-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
18+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/vaadin-maps-leaflet-flow/releases/latest)"
1919
required: true
20-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
20+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/vaadin-maps-leaflet-flow/issues) or [closed](https://github.com/xdev-software/vaadin-maps-leaflet-flow/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
2121
required: true
2222
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2323
required: true

.github/ISSUE_TEMPLATE/config.yml

+3
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/ISSUE_TEMPLATE/enhancement.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: "Checklist"
1515
options:
16-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
16+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/vaadin-maps-leaflet-flow/issues) or [closed](https://github.com/xdev-software/vaadin-maps-leaflet-flow/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1717
required: true
1818
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
1919
required: true

.github/ISSUE_TEMPLATE/question.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/vaadin-maps-leaflet-flow/issues) or [closed](https://github.com/xdev-software/vaadin-maps-leaflet-flow/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
1818
required: true

.github/workflows/no-response.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: No Response
2+
3+
on:
4+
workflow_dispatch:
5+
issue_comment:
6+
types: [created]
7+
schedule:
8+
- cron: '5 5 * * *'
9+
10+
jobs:
11+
noResponse:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
issues: write
15+
steps:
16+
- uses: actions/stale@v9
17+
with:
18+
days-before-issue-stale: 7
19+
days-before-issue-close: 3
20+
stale-issue-label: "stale"
21+
only-labels: "waiting-for-response"
22+
labels-to-remove-when-unstale: "waiting-for-response"
23+
stale-issue-message: "This issue will be closed soon because there has been no further activity."
24+
days-before-pr-stale: -1
25+
days-before-pr-close: -1
26+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.run/Run Demo.run.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<component name="ProjectRunConfigurationManager">
22
<configuration default="false" name="Run Demo" type="Application" factoryName="Application">
33
<option name="MAIN_CLASS_NAME" value="software.xdev.vaadin.Application" />
4-
<module name="template-placeholder-demo" />
4+
<module name="vaadin-maps-leaflet-flow-demo" />
55
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
66
<extension name="coverage">
77
<pattern>

CHANGELOG.md

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
## 4.6.2
2+
* Fix naming so that Vaadin Directory sync works #526
3+
4+
## 4.6.1
5+
* Updated dependencies
6+
7+
## 4.6.0
8+
* Changed all occurrences of ``Integer`` and ``Double`` to ``Number`` for improved compatibility with Leaflet's API
9+
* Updated OpenStreetMap's Tile-Server address to ``tile.openstreetmap.org`` [openstreetmap/operations#737](https://github.com/openstreetmap/operations/issues/737)
10+
11+
## 4.5.0
12+
* Added support for [WMS](https://leafletjs.com/reference.html#tilelayer-wms) #486
13+
* Updated dependencies
14+
15+
## 4.4.0
16+
* Added support for [GeoJSON](https://leafletjs.com/reference.html#geojson) and [FeatureGroup](https://leafletjs.com/reference.html#featuregroup) #438
17+
* Add "draggable" property to LMarkerOptions #413 (thanks to @ChristianHoesel)
18+
19+
## 4.3.0
20+
* Updated to Vaadin 24.4
21+
* Deduplicated ``tLMapZoomPanOptions``
22+
23+
## 4.2.1
24+
* Handle ``LEvented#off`` in the same way as ``LEvented#on``
25+
* Fix incorrect formatting leading to JS error
26+
* Updated dependencies
27+
28+
## 4.2.0
29+
* Fixed some invalid built JavaScript commands #330
30+
* Add basic support for CRS #333
31+
* Added a few new showcase demos
32+
* Updated dependencies
33+
34+
## 4.1.1
35+
* ⚠️ GroupId changed from ``com.xdev-software`` to ``software.xdev``
36+
* Updated dependencies
37+
38+
## 4.1.0
39+
* Provide a workaround that fixes a problem where certain methods didn't work instantly after the map was created #305
40+
* Moved some container specific methods to ``MapContainer``
41+
42+
## 4.0.1
43+
* Added shortcut method ``invokeSelfReturn`` #282
44+
* Updated dependencies
45+
46+
## 4.0.0
47+
⚠️<i>This release contains breaking changes</i>
48+
49+
* The complete API got reworked and now has the [same structure as Leaflet](https://leafletjs.com/reference.html).
50+
* Added lots of new Leaflet APIs - currently around 90% of the Leaflet API are implemented. These include the most useful bits:
51+
* GeoLocation
52+
* A lot of new methods for Map
53+
* Tooltips & Popups
54+
* Image, Video and SVG-Overlays
55+
* Rectangles
56+
* Controls for Scale, Layers, ...
57+
* and much more
58+
* Abstracted the elements similar to how this is done inside Leaflet itself so that they can easily be extended
59+
* The API only supports sending instructions to the client. Retrieving client side data is not supported as data integrity can't be guaranteed (client-side data can be modified by users).
60+
* Event listeners can still be registered but this needs to be done manually. A example is available in the demo.
61+
* All Leaflet elements are now tracked on the client and on the server and can therefore be modified/reused (using ``LComponentManagementRegistry``).
62+
* Before it was only possible to create an element and then send it to the client
63+
* However keep in mind when creating a lot of elements that you may have to free up memory on the client (manually)
64+
* Integrated default Leaflet resources
65+
66+
## 3.0.2
67+
* Added support for Polyline #266 (thanks to @blitzdose)
68+
69+
## 3.0.1
70+
* Fixed ``divIcon`` being displayed incorrectly [due to a default ``iconSize`` of ``12px``](https://github.com/Leaflet/Leaflet/issues/4238) #246
71+
* Updated dependencies
72+
* Updated leaflet to [``1.9.4``](https://github.com/Leaflet/Leaflet/blob/b6b56f6e707142c177fad2f67827a5007e56736a/CHANGELOG.md#194-2023-05-18) #247
73+
74+
## 3.0.0
75+
⚠️<i>This release contains breaking changes</i>
76+
77+
* Adds support for Vaadin 24+, drops support for Vaadin 23<br/>
78+
<i>If you are still using Vaadin 23, use the ``2.x`` versions.</i>
79+
* Requires Java 17+
80+
81+
## 2.0.4
82+
* Added method ``centerAndZoom`` in ``LMap``
83+
* Fixed a problem where an invalid ``iconSize`` was transferred to leaflet which caused a client side exception (#199)
84+
* Updated various dependencies
85+
86+
## 2.0.3
87+
* Updated dependencies
88+
* Fixed problem with setting lon/lan in LMarker
89+
* Added constructors for LMap
90+
91+
## 2.0.2
92+
* Updated dependencies
93+
94+
## 2.0.1
95+
* Updated dependencies
96+
* Vaadin 23.2
97+
98+
## 2.0.0
99+
⚠️<i>This release contains breaking changes</i>
100+
101+
* Update to Vaadin 23
102+
* Removed deprecated polymer-connector - replaced by ``executeJs``
103+
* Fixed a problem where the map was not rendered/aligned correctly
104+
* Don't load anything from remote servers that are not under control of the user
105+
* Shrunk the jar
106+
* Removed default leafletmap tile layer; has to be set manually due to usage policy
107+
* Updated dependency versions

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ Bigger changes may require a complete restart.
4747
* [Vaadin automatically reloads the UI on each restart](https://vaadin.com/docs/latest/configuration/live-reload/spring-boot).<br/>
4848
You can control this behavior with the ``vaadin.devmode.liveReload.enabled`` property (default: ``true``).
4949

50-
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/release.yml?branch=master)](https://github.com/xdev-software/template-placeholder/actions/workflows/release.yml)
50+
## Releasing [![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/vaadin-maps-leaflet-flow/release.yml?branch=master)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions/workflows/release.yml)
5151

5252
Before releasing:
53-
* Consider doing a [test-deployment](https://github.com/xdev-software/template-placeholder/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
53+
* Consider doing a [test-deployment](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions/workflows/test-deploy.yml?query=branch%3Adevelop) before actually releasing.
5454
* Check the [changelog](CHANGELOG.md)
5555

5656
If the ``develop`` is ready for release, create a pull request to the ``master``-Branch and merge the changes

README.md

+43-9
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,58 @@
1-
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0?logo=vaadin)](https://vaadin.com/directory/component/template-placeholder)
2-
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/template-placeholder?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/template-placeholder)
3-
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/template-placeholder/check-build.yml?branch=develop)](https://github.com/xdev-software/template-placeholder/actions/workflows/check-build.yml?query=branch%3Adevelop)
4-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_template-placeholder&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_template-placeholder)
1+
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0?logo=vaadin)](https://vaadin.com/directory/component/leafletmap-for-vaadin)
2+
[![Latest version](https://img.shields.io/maven-central/v/software.xdev/vaadin-maps-leaflet-flow?logo=apache%20maven)](https://mvnrepository.com/artifact/software.xdev/vaadin-maps-leaflet-flow)
3+
[![Build](https://img.shields.io/github/actions/workflow/status/xdev-software/vaadin-maps-leaflet-flow/check-build.yml?branch=develop)](https://github.com/xdev-software/vaadin-maps-leaflet-flow/actions/workflows/check-build.yml?query=branch%3Adevelop)
4+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=xdev-software_vaadin-maps-leaflet-flow&metric=alert_status)](https://sonarcloud.io/dashboard?id=xdev-software_vaadin-maps-leaflet-flow)
55
![Vaadin 24+](https://img.shields.io/badge/Vaadin%20Platform/Flow-24+-00b4f0)
66

7-
# template-placeholder
8-
A Vaadin Template Repo
7+
# LeafletMap for Vaadin
8+
A Vaadin Flow Java API for [Leaflet](https://leafletjs.com/)
99

1010
![demo](assets/demo.png)
1111

12+
## Usage
13+
14+
This API wraps the Leaflet API in a Vaadin friendly way.<br/>It uses a similar structure (classes, methods) as the [Leaflet JavaScript API](https://leafletjs.com/reference.html).
15+
16+
To get started it's recommended to have a look at the [demo](./vaadin-maps-leaflet-flow-demo), notably the [minimalistic example](./vaadin-maps-leaflet-flow-demo/src/main/java/software/xdev/vaadin/maps/leaflet/flow/demo/MinimalisticDemo.java).
17+
18+
> [!NOTE]
19+
> **The API only supports sending instructions to the client**<br/>
20+
> Due to data integrity retrieving client-side data (that can be modified by users) is not supported.
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>
1236
1337
## Installation
14-
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
38+
[Installation guide of the latest release](https://github.com/xdev-software/vaadin-maps-leaflet-flow/releases/latest#Installation)
39+
40+
#### Static resources
41+
Please note that Leaflet uses a few default icons for various components (e.g. Markers).<br/>
42+
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/>
43+
You might have to fine tune your security configuration to allow these.
44+
45+
#### Compatibility with Vaadin
46+
| Vaadin version | vaadin-maps-leaflet-flow version |
47+
| --- | --- |
48+
| Vaadin 24+ (latest) | ``3+`` |
1549
1650
### Spring-Boot
1751
* You may have to include ``software/xdev`` inside [``vaadin.allowed-packages``](https://vaadin.com/docs/latest/integrations/spring/configuration#configure-the-scanning-of-packages)
1852
1953
## Run the Demo
2054
* Checkout the repo
21-
* Run ``mvn install && mvn -f template-placeholder-demo spring-boot:run``
55+
* Run ``mvn install && mvn -f vaadin-maps-leaflet-flow-demo spring-boot:run``
2256
* Open http://localhost:8080
2357
2458
<details>
@@ -34,4 +68,4 @@ If you need support as soon as possible and you can't wait for any pull request,
3468
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
3569
3670
## Dependencies and Licenses
37-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/template-placeholder/dependencies)
71+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/vaadin-maps-leaflet-flow/dependencies)

SECURITY.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## Reporting a Vulnerability
44

5-
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/template-placeholder/security/advisories/new).
5+
Please report a security vulnerability [on GitHub Security Advisories](https://github.com/xdev-software/vaadin-maps-leaflet-flow/security/advisories/new).

assets/demo.avif

2.46 MB
Binary file not shown.

assets/demo.png

353 KB
Loading

pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<modelVersion>4.0.0</modelVersion>
66

77
<groupId>software.xdev</groupId>
8-
<artifactId>template-placeholder-root</artifactId>
9-
<version>1.0.0-SNAPSHOT</version>
8+
<artifactId>vaadin-maps-leaflet-flow-root</artifactId>
9+
<version>4.6.3-SNAPSHOT</version>
1010
<packaging>pom</packaging>
1111

1212
<organization>
@@ -15,8 +15,8 @@
1515
</organization>
1616

1717
<modules>
18-
<module>template-placeholder</module>
19-
<module>template-placeholder-demo</module>
18+
<module>vaadin-maps-leaflet-flow</module>
19+
<module>vaadin-maps-leaflet-flow-demo</module>
2020
</modules>
2121

2222
<properties>

renovate.json5

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"packageRules": [
55
{
66
"description": "Ignore project internal dependencies",
7-
"packagePattern": "^software.xdev:template-placeholder",
7+
"packagePattern": "^software.xdev:vaadin-maps-leaflet-flow",
88
"datasources": [
99
"maven"
1010
],

template-placeholder-demo/pom.xml renamed to vaadin-maps-leaflet-flow-demo/pom.xml

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
<parent>
88
<groupId>software.xdev</groupId>
9-
<artifactId>template-placeholder-root</artifactId>
10-
<version>1.0.0-SNAPSHOT</version>
9+
<artifactId>vaadin-maps-leaflet-flow-root</artifactId>
10+
<version>4.6.3-SNAPSHOT</version>
1111
</parent>
1212

13-
<artifactId>template-placeholder-demo</artifactId>
14-
<version>1.0.0-SNAPSHOT</version>
13+
<artifactId>vaadin-maps-leaflet-flow-demo</artifactId>
14+
<version>4.6.3-SNAPSHOT</version>
1515
<packaging>jar</packaging>
1616

1717
<organization>
@@ -70,7 +70,7 @@
7070
</dependency>
7171
<dependency>
7272
<groupId>software.xdev</groupId>
73-
<artifactId>template-placeholder</artifactId>
73+
<artifactId>vaadin-maps-leaflet-flow</artifactId>
7474
<version>${project.version}</version>
7575
</dependency>
7676

0 commit comments

Comments
 (0)