Skip to content

Commit f667f6a

Browse files
committed
Merge branch 'develop' into update-from-template-merged
2 parents 78bcd11 + 58dd62a commit f667f6a

File tree

127 files changed

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

127 files changed

+9521
-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
@@ -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

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
@@ -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

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

0 commit comments

Comments
 (0)