Vicemene funkcni mapova cast planovace
This commit is contained in:
@@ -52,7 +52,7 @@ export const useFlightPlanObjects = () => {
|
||||
}
|
||||
}
|
||||
|
||||
const infoWindowObject = ({active, position, marker, poi, airport, airspaces}) => {
|
||||
const infoWindowObject = ({active, position, marker, poi, airport, reportingPoint, airspaces}) => {
|
||||
if (!position) position = {};
|
||||
if (!position.lat) position.lat = 0;
|
||||
if (!position.lng) position.lng = 0;
|
||||
@@ -60,9 +60,15 @@ export const useFlightPlanObjects = () => {
|
||||
let title = null;
|
||||
|
||||
if (airport) {
|
||||
title = `${airport.icaoCode} (${airport.name})`;
|
||||
position.lat = airport.gpsLatitude;
|
||||
position.lng = airport.gpsLongitude;
|
||||
if (!reportingPoint) {
|
||||
title = `${airport.icaoCode} (${airport.name})`;
|
||||
position.lat = airport.gpsLatitude;
|
||||
position.lng = airport.gpsLongitude;
|
||||
} else {
|
||||
title = `${airport.icaoCode}:${reportingPoint.name}`
|
||||
position.lat = reportingPoint.gpsLatitude;
|
||||
position.lng = reportingPoint.gpsLongitude;
|
||||
}
|
||||
}
|
||||
|
||||
if (marker) {
|
||||
@@ -77,7 +83,7 @@ export const useFlightPlanObjects = () => {
|
||||
position.lng = poi.gpsLongitude;
|
||||
}
|
||||
|
||||
return {title, active, position, airspaces, poi, marker, airport};
|
||||
return {title, active, position, airspaces, poi, marker, airport, reportingPoint};
|
||||
};
|
||||
|
||||
return {markerObject, googleMapsMarkerObject, googleMapsCustomMarkerObject, infoWindowObject, editableNameTypes}
|
||||
|
||||
Reference in New Issue
Block a user