diff --git a/04.系统编码/.vs/BeijingSafeguard/v15/.suo b/04.系统编码/.vs/BeijingSafeguard/v15/.suo index 5839835..3038264 100644 Binary files a/04.系统编码/.vs/BeijingSafeguard/v15/.suo and b/04.系统编码/.vs/BeijingSafeguard/v15/.suo differ diff --git a/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal b/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal index a0d25b8..72de6a2 100644 Binary files a/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal and b/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal differ diff --git a/04.系统编码/App/App.csproj b/04.系统编码/App/App.csproj index 05162a3..d00fd91 100644 --- a/04.系统编码/App/App.csproj +++ b/04.系统编码/App/App.csproj @@ -214,6 +214,7 @@ + diff --git a/04.系统编码/App/Content/scripts/menggu/map.js b/04.系统编码/App/Content/scripts/menggu/map.js index 10cb35d..14f6c0f 100644 --- a/04.系统编码/App/Content/scripts/menggu/map.js +++ b/04.系统编码/App/Content/scripts/menggu/map.js @@ -23,8 +23,10 @@ var Map = function (parent) { this.WindTemplate = null; this.MultiLayers = false; this.isMark = false; + this.isSelected = false; this.InfoPoint = new InfoPoint(this); + this.SelectPoint = new SelectPoint(this); this.Startup = function () { this.CreateMap(); @@ -32,7 +34,9 @@ var Map = function (parent) { this.LoadWindTemplate(); this.LoadInfoPoint(); this.InfoPoint.Startup(); + this.SelectPoint.Startup(); + $('#select-point-button').on('click', this.onSelectPointClick.bind(this)); $('#mark-button').on('click', this.onMarkClick.bind(this)); $('#draw-button').on('click', this.OnDrawButtonClick.bind(this)); $('#clear-button').on('click', this.OnClearButtonClick.bind(this)); @@ -405,6 +409,22 @@ var Map = function (parent) { }); }; + this.onSelectPointClick = function () { + this.isSelected = true; + + $('#map').css('cursor', 'crosshair'); + this.SelectPiontInfo(); + }; + + this.SelectPiontInfo = function () { + this.map.on('click', function (e) { + if (this.isSelected) + this.SelectPoint.ShowDialog(e.latlng); + else + return; + }.bind(this)); + }; + this.onMarkClick = function () { this.isMark = true; diff --git a/04.系统编码/App/Content/scripts/menggu/select-point.js b/04.系统编码/App/Content/scripts/menggu/select-point.js new file mode 100644 index 0000000..7c1fba2 --- /dev/null +++ b/04.系统编码/App/Content/scripts/menggu/select-point.js @@ -0,0 +1,56 @@ +var SelectPoint = function (parent) { + this.Parent = parent; + + this.Startup = function () { + $('#copy-longitude').on('click', this.OnClickLngClick.bind(this)); + $('#copy-latitude').on('click', this.onCopyLatClick.bind(this)); + $('#close-select-point-dialog').on('click', this.HideDialog.bind(this)); + $('#dialog-select-point-cancel').on('click', this.HideDialog.bind(this)); + }; + + this.ShowDialog = function (point) { + $('#dialog-select-point').show(); + $("#lng").val(this.getLatLng(point.lng)); + $("#lat").val(this.getLatLng(point.lat)); + }; + + this.HideDialog = function () { + $('#dialog-select-point').hide(); + $('#map').css('cursor', 'grab'); + + this.Parent.isSelected = false; + }; + + this.getLatLng = function (value) { + value = value.toString() + let index = value.indexOf('.') + if (index !== -1) { + value = value.substring(0, 6 + index + 1) + } else { + value = value.substring(0) + } + return parseFloat(value).toFixed(6) + } + + this.OnClickLngClick = function () { + if ($("#lng").val().trim() === '') { + alert('请输入经度'); + return; + } else { + var selected = document.querySelector('#lng'); + selected.select(); + document.execCommand('Copy'); + } + }; + + this.onCopyLatClick = function () { + if ($("#lat").val().trim() === '') { + alert('请输入纬度'); + return; + } else { + var selected = document.querySelector('#lat'); + selected.select(); + document.execCommand('Copy'); + } + } +} \ No newline at end of file diff --git a/04.系统编码/App/Views/Menggu/Index.cshtml b/04.系统编码/App/Views/Menggu/Index.cshtml index 6838103..a88dac0 100644 --- a/04.系统编码/App/Views/Menggu/Index.cshtml +++ b/04.系统编码/App/Views/Menggu/Index.cshtml @@ -15,9 +15,12 @@
时间标签
- 信息点标绘... - 画线... - 清除... + 导出图片... @@ -40,6 +43,31 @@
+
+
+
+

鼠标点选

+
+ +
+
+ + + +
+
+ + + +
+
+
+
+ +
+
+
+
@@ -141,6 +169,7 @@ +