@@ -261,10 +261,38 @@ public static class DragEndEvent extends ComponentEvent<GoogleMapMarker> {
261261 private final double lat ;
262262 private final double lon ;
263263
264+ /**
265+ * Creates a new event with the drag end coordinates as separate lat/lon values.
266+ *
267+ * @param source the marker that was dragged
268+ * @param fromClient whether the event originated on the client side
269+ * @param lat the latitude of the drag end
270+ * @param lon the longitude of the drag end
271+ */
272+ public DragEndEvent (
273+ GoogleMapMarker source ,
274+ boolean fromClient ,
275+ @ EventData ("event.detail.latLng.lat()" ) double lat ,
276+ @ EventData ("event.detail.latLng.lng()" ) double lon ) {
277+ super (source , fromClient );
278+ this .lat = lat ;
279+ this .lon = lon ;
280+ }
281+
282+ /**
283+ * Creates a new event with the drag end coordinates as a JSON value.
284+ *
285+ * @param source the marker that was dragged
286+ * @param fromClient whether the event originated on the client side
287+ * @param latLng a JSON object containing {@code lat} and {@code lng} properties
288+ * @deprecated since 2.6.0, for removal. Use
289+ * {@link #DragEndEvent(GoogleMapMarker, boolean, double, double)} instead.
290+ */
291+ @ Deprecated
264292 public DragEndEvent (
265293 GoogleMapMarker source ,
266294 boolean fromClient ,
267- @ EventData ( value = "event.detail.latLng" ) JsonValue latLng ) {
295+ JsonValue latLng ) {
268296 super (source , fromClient );
269297 this .lat = ((JsonObject ) latLng ).getNumber ("lat" );
270298 this .lon = ((JsonObject ) latLng ).getNumber ("lng" );
0 commit comments