@@ -299,8 +299,34 @@ public static class GoogleMapMarkerClickEvent extends ClickEvent<GoogleMapMarker
299299 private final double lat ;
300300 private final double lon ;
301301
302+ /**
303+ * Creates a new event with the click coordinates as separate lat/lon values.
304+ *
305+ * @param source the marker that was clicked
306+ * @param fromClient whether the event originated on the client side
307+ * @param lat the latitude of the click
308+ * @param lon the longitude of the click
309+ */
302310 public GoogleMapMarkerClickEvent (GoogleMapMarker source , boolean fromClient ,
303- @ EventData (value = "event.detail.latLng" ) JsonValue latLng ) {
311+ @ EventData ("event.detail.latLng.lat()" ) double lat ,
312+ @ EventData ("event.detail.latLng.lng()" ) double lon ) {
313+ super (source );
314+ this .lat = lat ;
315+ this .lon = lon ;
316+ }
317+
318+ /**
319+ * Creates a new event with the click coordinates as a JSON value.
320+ *
321+ * @param source the marker that was clicked
322+ * @param fromClient whether the event originated on the client side
323+ * @param latLng a JSON object containing {@code lat} and {@code lng} properties
324+ * @deprecated since 2.6.0, for removal. Use
325+ * {@link #GoogleMapMarkerClickEvent(GoogleMapMarker, boolean, double, double)} instead.
326+ */
327+ @ Deprecated
328+ public GoogleMapMarkerClickEvent (GoogleMapMarker source , boolean fromClient ,
329+ JsonValue latLng ) {
304330 super (source );
305331 this .lat = ((JsonObject ) latLng ).getNumber ("lat" );
306332 this .lon = ((JsonObject ) latLng ).getNumber ("lng" );
0 commit comments