diff --git a/tabs/advanced_tuning.js b/tabs/advanced_tuning.js
index 06c195b74..0dc69cc13 100644
--- a/tabs/advanced_tuning.js
+++ b/tabs/advanced_tuning.js
@@ -56,6 +56,10 @@ TABS.advanced_tuning.initialize = function (callback) {
$('.notFixedWingTuning').show();
}
+ if (!FC.isFeatureEnabled('GEOZONE')) {
+ $('#geozoneSettings').hide();
+ }
+
GUI.simpleBind();
i18n.localize();;
diff --git a/tabs/mission_control.js b/tabs/mission_control.js
index 6aa3eb879..1afca6c1d 100644
--- a/tabs/mission_control.js
+++ b/tabs/mission_control.js
@@ -892,11 +892,11 @@ TABS.mission_control.initialize = function (callback) {
width: 3,
})
})
- ]
+ ],
});
- vectorLayer.kind = "geozoneline";
- vectorLayer.selection = false;
+ vectorLayer.kind = "geozonecircle";
+ vectorLayer.selection = true;
geozoneLines.push(vectorLayer);
map.addLayer(vectorLayer);
@@ -1748,17 +1748,49 @@ TABS.mission_control.initialize = function (callback) {
\
\
\
- \
+ \
| \
\
- \
+ \
| \
\
');
const $row = $verticesTable.find('tr:last');
$row.find('.vertexNumber').text(vertex.getNumber() + 1);
- $row.find('.vertexLat').val((vertex.getLatMap()).toLocaleString(['en-US'], {minimumFractionDigits: 7}));
- $row.find('.vertexLon').val((vertex.getLonMap()).toLocaleString(['en-US'], {minimumFractionDigits: 7}));
+
+ $row.find('.vertexLat')
+ .val((vertex.getLatMap())
+ .toLocaleString(['en-US'], {minimumFractionDigits: 7}))
+ .on('change', event => {
+ const lat = $(event.currentTarget).val();
+ if (isNaN(lat) || lat < -90 || lat > 90) {
+ GUI.alert(i18n.getMessage("geozoneInvalidLat"));
+ $(event.currentTarget).val(vertex.getLatMap());
+ return;
+ }
+ vertex.setLat(lat * 1e7);
+ renderGeozoneOptions();
+ renderGeozonesOnMap();
+ updateGeozoneInfo();
+
+ });
+
+ $row.find('.vertexLon')
+ .val((vertex.getLonMap())
+ .toLocaleString(['en-US'], {minimumFractionDigits: 7}))
+ .on('change', event => {
+ const lat = $(event.currentTarget).val();
+ if (isNaN(lat) || lat < -180 || lat > 180) {
+ GUI.alert(i18n.getMessage("geozoneInvalidLon"));
+ $(event.currentTarget).val(vertex.getLonMap());
+ return;
+ }
+ vertex.setLon(lat * 1e7);
+ renderGeozoneOptions();
+ renderGeozonesOnMap();
+ updateGeozoneInfo();
+ });
+
$row.find('#removeVertex').on('click', event => {
if (selectedGeozone.getVerticesCount() > 3) {
selectedGeozone.dropVertex(vertex.getNumber());
@@ -2150,7 +2182,7 @@ TABS.mission_control.initialize = function (callback) {
*/
app.Drag.prototype.handleDragEvent = function (evt) {
- if (tempMarker.kind == "safehomecircle") {
+ if (tempMarker.kind == "safehomecircle" || tempMarker.kind == "geozonecircle") {
return;
}
@@ -2213,7 +2245,7 @@ TABS.mission_control.initialize = function (callback) {
renderGeozoneOptions();
renderGeozonesOnMap();
updateGeozoneInfo();
- }
+ }
};
/**