Get origin & destination from JS code?

Hi, sorry if this is answered in the documentation, but I would like to be
able to retrieve the departure & destination locations, as set in the World
Map, from JS in an in game panel, is that possible?

For anyone happening across this thread who can’t find the info, you can get
it from Flight Plan SimVars, as long as a complete flight plan (ie: at least
departure and destination) has been entered / loaded on the World Map.

this.depLat = SimVar.GetSimVarValue("C:fs9gps:FlightPlanDepartureLatitude", "Degrees");
this.depLon = SimVar.GetSimVarValue("C:fs9gps:FlightPlanDepartureLongitude", "Degrees");
this.destLat = SimVar.GetSimVarValue("C:fs9gps:FlightPlanDestinationLatitude", "Degrees");
this.destLon = SimVar.GetSimVarValue("C:fs9gps:FlightPlanDestinationLongitude", "Degrees");