Skip to content

Commit 1d8a95c

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents e7bd99c + e766b60 commit 1d8a95c

File tree

122 files changed

+9183
-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.

122 files changed

+9183
-35
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ body:
1414
attributes:
1515
label: "Checklist"
1616
options:
17-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
17+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/vaadin-maps-leaflet-flow/releases/latest)"
1818
required: true
19-
- 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."
19+
- 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."
2020
required: true
2121
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2222
required: true

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

Lines changed: 1 addition & 1 deletion
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 feature request will be dismissed otherwise."
1818
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 1 addition & 1 deletion
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

Lines changed: 26 additions & 0 deletions
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

Lines changed: 1 addition & 1 deletion
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

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

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
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

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,41 @@
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+
# vaadin-maps-leaflet-flow
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+
> * 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).
1222
1323
## Installation
14-
[Installation guide for the latest release](https://github.com/xdev-software/template-placeholder/releases/latest#Installation)
24+
[Installation guide of the latest release](https://github.com/xdev-software/vaadin-maps-leaflet-flow/releases/latest#Installation)
25+
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+
31+
#### Compatibility with Vaadin
32+
| Vaadin version | vaadin-maps-leaflet-flow version |
33+
| --- | --- |
34+
| Vaadin 24+ (latest) | ``3+`` |
1535

1636
## Run the Demo
1737
* Checkout the repo
18-
* Run ``mvn install && mvn -f template-placeholder-demo spring-boot:run``
38+
* Run ``mvn install && mvn -f vaadin-maps-leaflet-flow-demo spring-boot:run``
1939
* Open http://localhost:8080
2040

2141
<details>
@@ -31,4 +51,4 @@ If you need support as soon as possible and you can't wait for any pull request,
3151
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
3252

3353
## Dependencies and Licenses
34-
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/template-placeholder/dependencies)
54+
View the [license of the current project](LICENSE) or the [summary including all dependencies](https://xdev-software.github.io/vaadin-maps-leaflet-flow/dependencies)

0 commit comments

Comments
 (0)