diff --git a/sw/ground_segment/cockpit/live.ml b/sw/ground_segment/cockpit/live.ml index f99d5ba4ec..915977401b 100644 --- a/sw/ground_segment/cockpit/live.ml +++ b/sw/ground_segment/cockpit/live.ml @@ -1070,7 +1070,7 @@ module GCS_icon = struct and lon = Pprz.float_assoc "long" vs in let wgs84 = LL.make_geo_deg lat lon in - geomap#move_item item wgs84 + geomap#move_item ~z:geomap#current_zoom item wgs84 end (* module GCS_icon *) diff --git a/sw/lib/ocaml/mapCanvas.ml b/sw/lib/ocaml/mapCanvas.ml index b550e984de..5e380f07e2 100644 --- a/sw/lib/ocaml/mapCanvas.ml +++ b/sw/lib/ocaml/mapCanvas.ml @@ -355,9 +355,9 @@ object (self) end | None -> failwith "#of_world : no georef" - method move_item = fun (item:GnomeCanvas.re_p GnoCanvas.item) wgs84 -> + method move_item = fun ?(z = 1.) (item:GnomeCanvas.re_p GnoCanvas.item) wgs84 -> let (xw,yw) = self#world_of wgs84 in - item#affine_absolute (affine_pos_and_angle xw yw 0.); + item#affine_absolute (affine_pos_and_angle ~z xw yw 0.); method moveto = fun wgs84 -> let (xw, yw) = self#world_of wgs84 in diff --git a/sw/lib/ocaml/mapCanvas.mli b/sw/lib/ocaml/mapCanvas.mli index dc95020615..bf7621a5fe 100644 --- a/sw/lib/ocaml/mapCanvas.mli +++ b/sw/lib/ocaml/mapCanvas.mli @@ -76,6 +76,7 @@ class widget : method menubar : GMenu.menu_shell method mouse_motion : GdkEvent.Motion.t -> bool method move_item : + ?z:float -> GnomeCanvas.re_p GnoCanvas.item -> Latlong.geographic -> unit method moveto : Latlong.geographic -> unit method of_world : Latlong.fmeter * Latlong.fmeter -> Latlong.geographic