diff --git a/pom.xml b/pom.xml
index f0528eb..0899d3a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.flowingcode.vaadin.addons
google-maps
- 2.4.1-SNAPSHOT
+ 2.5.0-SNAPSHOT
Google Maps Addon
Integration of google-map for Vaadin platform
@@ -555,7 +555,56 @@
-
+
+
+ dance
+
+
+
+ org.apache.maven.plugins
+ maven-clean-plugin
+
+
+
+ ${project.basedir}
+
+ package.json
+ package-lock.json
+ tsconfig.json
+ tsconfig.json.*
+ types.d.ts
+ types.d.ts.*
+ vite.config.ts
+ vite.generated.ts
+ webpack.config.js
+ webpack.generated.js
+
+
+
+ ${project.basedir}/frontend
+
+ index.html
+
+
+
+ ${project.basedir}/frontend/generated
+
+
+ ${project.basedir}/node_modules
+
+
+ ${project.basedir}/src/main/bundles
+
+
+ ${project.basedir}/src/main/dev-bundle
+
+
+
+
+
+
+
+
-
+
diff --git a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPoly.java b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPoly.java
index c454f02..c8b1e1d 100644
--- a/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPoly.java
+++ b/src/main/java/com/flowingcode/vaadin/addons/googlemaps/GoogleMapPoly.java
@@ -160,10 +160,38 @@ public static class GoogleMapPolyClickEvent extends ClickEvent
private final double lat;
private final double lon;
+ /**
+ * Creates a new event with the click coordinates as separate lat/lon values.
+ *
+ * @param source the polygon that was clicked
+ * @param fromClient whether the event originated on the client side
+ * @param lat the latitude of the click
+ * @param lon the longitude of the click
+ */
public GoogleMapPolyClickEvent(
GoogleMapPoly source,
boolean fromClient,
- @EventData(value = "event.detail.latLng") JsonValue latLng) {
+ @EventData("event.detail.latLng.lat()") double lat,
+ @EventData("event.detail.latLng.lng()") double lon) {
+ super(source);
+ this.lat = lat;
+ this.lon = lon;
+ }
+
+ /**
+ * Creates a new event with the click coordinates as a JSON value.
+ *
+ * @param source the polygon that was clicked
+ * @param fromClient whether the event originated on the client side
+ * @param latLng a JSON object containing {@code lat} and {@code lng} properties
+ * @deprecated since 2.5.0, for removal. Use
+ * {@link #GoogleMapPolyClickEvent(GoogleMapPoly, boolean, double, double)} instead.
+ */
+ @Deprecated
+ public GoogleMapPolyClickEvent(
+ GoogleMapPoly source,
+ boolean fromClient,
+ JsonValue latLng) {
super(source);
lat = ((JsonObject) latLng).getNumber("lat");
lon = ((JsonObject) latLng).getNumber("lng");