From 49a60f31f992431bfbcea84103b943ddeb48f76a Mon Sep 17 00:00:00 2001 From: hhx <1284857778@qq.com> Date: Sat, 15 Jan 2022 22:51:16 +0800 Subject: [PATCH] commit --- 04.系统编码/.vs/BeijingSafeguard/v15/.suo | Bin 204800 -> 172544 bytes .../v15/Server/sqlite3/storage.ide-wal | Bin 4157112 -> 4157112 bytes 04.系统编码/App/App.csproj | 1 + .../App/Content/scripts/beijing/map.js | 4 +- .../App/Content/scripts/menggu/info-point.js | 60 +++++++ .../App/Content/scripts/menggu/map.js | 153 ++++++++++++++++++ 04.系统编码/App/Views/Menggu/Index.cshtml | 51 ++++++ 7 files changed, 268 insertions(+), 1 deletion(-) create mode 100644 04.系统编码/App/Content/scripts/menggu/info-point.js diff --git a/04.系统编码/.vs/BeijingSafeguard/v15/.suo b/04.系统编码/.vs/BeijingSafeguard/v15/.suo index d00f436d20b479cff9ec4ff86b9cc9b84f08a6d2..f9b5085cd34b66af37a691469dd6fa8a91ee3ae9 100644 GIT binary patch delta 4772 zcmd^@dsx&}8pnU z1x|9b%yhKDw$=;3vOJaxlWqN=%1@bCgRfsHjZ6pdI^#EV}GsJzn%83uxY zY;h=%cA0uY?+^UJE#MsZ1bhav!PoFP519-G0a<34Pf9%%dS8$Pr0-bB-inf=%z+XO zWY0bXGII>19Bw9LB!Jo(1!)Bz`JSiwkP|?x zEHUjiXd%9wxsbQ}^mxcy!E7)c%m7!xEFk-3gDeC?fb3f_%HK%Jehn0{|xb8=JJt7zcpv*h`y?y_7QcQp(s%d1LGoVUw|! z^C!c3Q|zaEgWn68-LaPy$k#!s~w@dpWpbv@By^&27u{Tt7Ri`e7{e zbznV^p>BZO05*bppH131^hd!a&;$h747PyBz~f*mcmiw#PlD}W2XKL%U>A4_xIr`6 z&6Fw1(@=f|o&nE-UxPhhFW3k6gBGBI=fDBb3N-LMcmW&)zv26Ph6Q+_$?kSEl#KO` z(K5&Le>B#^oCTM&-}1`fYW5PpjNcb|Wv@T++~D||ts#F5Vku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XYwGC4w8V%exgTlho0C-ZzY_cghmp(zq;i_j_(xYbXdN@Anj6wGEV zGL1X^+!hXy%PkZmW3t#G3e(~=ua~Ukeho8EWApZtlxwu%m3)b0%bRqU<~T{~S(@La zA@YS22zvTk6fUffd*v5rRlX;&cc9C`()thbYTjbDl59*Svu5_v6>^twpggmdN6Y;y zIWkCnH~Y$9`F<@g@_4scNo%R+T#~uhsavxyVy~ZjBC|YmgYMMswDI4=-Pz1PeaE{u za)cP2lB6Z&@HzeeKK*j$AktbVb3C)VXU%qbbqo7z)(0>vsuJDlNy0k%A@?-)yKSM~ zPgDd-*y}&A8*c~o^=#7pPUe0^4YFem-y=sXEj@8f^?D$UprF^824`dR zq3ZWRZ%Orzgpw{V)pD)0)ga%urdPI_uS7K7`n6mAYBO~8bEcqo8XA@~nf&n;g1Xf2 zJji{^I8FPgp6@qU)c3Rl;D?)6eQ&D4RMz!C6%i^Uw!OkpWB!w2)xuFr=2g#IxM0bG zYI|u__5203^1w2FUbJqUFHNKP>-Ic;iFL+moCrZGPx-=wk}j3aa@CiTBnAXaO7epZe|oNJ_^YII~?B zaP%JA#ZT)+LH=Gz$8Zkz?`Dhq{ExVNx(b--|1;=L7F$arB2>V2tv4&*PH#V|qNje2 z6`bzb8TbZEk=Jj~$N*DMK+=A`VzF$wNqJ~UrtefyS(+cAUUj`C)vMlc>X%x$|P*`|aPyzMCun diff --git a/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal b/04.系统编码/.vs/BeijingSafeguard/v15/Server/sqlite3/storage.ide-wal index 2071b1eda71cc8f1c16b27da7e518ea7e6bbd8a7..08ca39b289991f5c171d8676155c561be9e0e945 100644 GIT binary patch delta 964 zcma*kTSyd97zgkYlYbtD*GQX%i*rwgz=sJE22N(@HR4*nO4Rb2B^P+6hK9)Pl zs=TQJeuDgu>aq2%v7a?5)A$LoYo4xVyW2F)oRnPIY=^}362Xtw!`ju?P3ccRU0M#~ zWyutccuL-ic*Nrx6u2y=C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;W+kN0>xo#7bw2iB#vji_vN!q6qk5TZtuvfshGICY5jy5Ue?b9R>;PH3U*X zV6P>N1kS_WIB!$@7Ac&J#|W&D2%?S%BTxYBmk9)bpjf)I*)?Q$l7hexe1C^P!8i~5 zIDv*BF5&}1PcUiooMV8D(1A$OH6oM{)A;;<_64%BAA;|fhdkvaGDrI?Ze=>ndJ$!b9d6#TuWV1=SkBpwX4hn6wflUEp;k1$Xh;$I>bPQN6MlDG zbPKW}0~$p1ta%&$SOOIwdkTTU!2c8x8b;x~4nHJx;g6G!J&;lYI`;SpbOwEsB<1~Q zAPF|%?+F1L?V<=ALcbV;Rl96w)AG^K(;_oCL{BKs6AqF(+~OR4aDcJ^0e*FrUpvTHd0CDZIB zo&?MN%A_~iT;Q|6v1K5G@DN^N1+kLw5t&35kxk?fxkMh3PZSUj5f2lEL=mw{+cHpG GbLL-@)`WNf diff --git a/04.系统编码/App/App.csproj b/04.系统编码/App/App.csproj index 1f640a6..4396783 100644 --- a/04.系统编码/App/App.csproj +++ b/04.系统编码/App/App.csproj @@ -205,6 +205,7 @@ + diff --git a/04.系统编码/App/Content/scripts/beijing/map.js b/04.系统编码/App/Content/scripts/beijing/map.js index ee64c45..3a356ef 100644 --- a/04.系统编码/App/Content/scripts/beijing/map.js +++ b/04.系统编码/App/Content/scripts/beijing/map.js @@ -97,7 +97,9 @@ var Map = function (parent) { L.tileLayer.gaodeOther().addTo(this.map); $('.leaflet-control-attribution').hide(); - this.map.on('mousemove', this.OnMapMove.bind(this)) + + $('.latlng').text('当前经纬度:{0}, {1}'.format(this.getLatLng(116.400000000), this.getLatLng(39.90000000))); + this.map.on('mousemove', this.OnMapMove.bind(this)); }; this.CenterMap = function (lat, lng) { diff --git a/04.系统编码/App/Content/scripts/menggu/info-point.js b/04.系统编码/App/Content/scripts/menggu/info-point.js new file mode 100644 index 0000000..8e1f137 --- /dev/null +++ b/04.系统编码/App/Content/scripts/menggu/info-point.js @@ -0,0 +1,60 @@ +var InfoPoint = function (parent) { + this.Parent = parent; + this.Point = null; + + this.Startup = function () { + $('.icon-view .icon-col').on('click', this.OnColClick.bind(this)); + $('#close-info-dialog').on('click', this.HideDialog.bind(this)); + $('#dialog-info-point-sure').on('click', this.OnSureClick.bind(this)); + $('#dialog-info-point-cancel').on('click', this.HideDialog.bind(this)); + }; + + this.OnColClick = function (event) { + $('.icon-view .icon-col').removeClass("active"); + + var label = $(event.target).is('img') ? $(event.target).parent('div') : $(event.target); + label.addClass("active"); + }; + + this.HideDialog = function () { + $('#dialog-info-point').hide(); + $('#map').css('cursor', 'grab'); + this.Parent.isMark = false; + }; + + this.ShowDialog = function (point) { + this.Point = point; + $('#dialog-info-point').show(); + $("#title").textbox('setValue', ''); + + $('.icon-view .icon-col').removeClass("active"); + $('.icon-view .icon-col').eq(0).addClass("active"); + }; + + this.OnSureClick = function () { + this.validation(); + } + + this.validation = function () { + if ($("#title").textbox('getValue').trim() === '') { + alert('请输入标题'); + return + } else { + $.ajax({ + type: "POST", + dataType: 'text', + url: '/Point/Add', + data: { + Title: $("#title").textbox('getValue'), + Icon: $('.icon-view .active').attr('name'), + Longitude: this.Point.lng, + Latitude: this.Point.lat + }, + success: function (result) { + this.Parent.AddInfoPoint(this.Point, $("#title").textbox('getValue'), $('.icon-view .active').attr('name'), result); + this.HideDialog(); + }.bind(this) + }); + } + } +} \ No newline at end of file diff --git a/04.系统编码/App/Content/scripts/menggu/map.js b/04.系统编码/App/Content/scripts/menggu/map.js index f70ab01..10cb35d 100644 --- a/04.系统编码/App/Content/scripts/menggu/map.js +++ b/04.系统编码/App/Content/scripts/menggu/map.js @@ -22,11 +22,20 @@ var Map = function (parent) { this.Parent = parent; this.WindTemplate = null; this.MultiLayers = false; + this.isMark = false; + + this.InfoPoint = new InfoPoint(this); this.Startup = function () { this.CreateMap(); this.InitCapture(); this.LoadWindTemplate(); + this.LoadInfoPoint(); + this.InfoPoint.Startup(); + + $('#mark-button').on('click', this.onMarkClick.bind(this)); + $('#draw-button').on('click', this.OnDrawButtonClick.bind(this)); + $('#clear-button').on('click', this.OnClearButtonClick.bind(this)); $('#particle-switch a').on('click', this.OnParticleButtonClick.bind(this)); $('#label-switch a').on('click', this.OnRemoveMarkersButtonClick.bind(this)); }; @@ -42,8 +51,30 @@ var Map = function (parent) { L.tileLayer.googleBase().addTo(this.map); L.tileLayer.googleDetail().addTo(this.map); $('.leaflet-control-attribution').hide(); + + $('.latlng').text('当前经纬度:{0}, {1}'.format(this.getLatLng(111.746303), this.getLatLng(40.854662))); + this.map.on('mousemove', this.OnMapMove.bind(this)); + }; + + this.CenterMap = function (lat, lng) { + this.map.setView([lat, lng], 11); + }; + + this.OnMapMove = function (e) { + $('.latlng').text('当前经纬度:{0}, {1}'.format(this.getLatLng(e.latlng.lng), this.getLatLng(e.latlng.lat))) }; + 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.OnParticleButtonClick = function () { // Toggle switch on/off var parent = $(event.target).parent(); @@ -86,6 +117,67 @@ var Map = function (parent) { } }; + this.OnDrawButtonClick = function () { + if (this.map.hasLayer(this.lineLayer)) + this.map.removeLayer(this.lineLayer); + + this.point = []; + this.lineLayer = new L.FeatureGroup(); + this.map.addLayer(this.lineLayer); + + this.map.on(L.Draw.Event.CREATED, function (e) { + this.lineLayer.addLayer(e.layer); + this.point.push([e.layer._latlngs[0].lng, e.layer._latlngs[0].lat], [e.layer._latlngs[1].lng, e.layer._latlngs[1].lat]); + this.AddPoints(this.lineLayer, this.point, 2, '#000000', '#ff0000'); + this.SetDistance(e.layer._latlngs[0].lng, e.layer._latlngs[0].lat, e.layer._latlngs[1].lng, e.layer._latlngs[1].lat, this.lineLayer); + }.bind(this)); + + this.map.on(L.Draw.Event.DRAWVERTEX, function (e) { + var layerIds = Object.keys(e.layers._layers); + if (layerIds.length > 1) { + var secondVertex = e.layers._layers[layerIds[1]]._icon; + requestAnimationFrame(() => secondVertex.click()); + } + }.bind(this)); + + var drawer = new L.Draw.Polyline(this.map, {}); + drawer.enable(); + }; + + this.OnClearButtonClick = function () { + if (this.map.hasLayer(this.lineLayer)) + this.map.removeLayer(this.lineLayer); + }; + + this.SetDistance = function (fromLon, fromLat, toLon, toLat, features) { + var lon = (fromLon + toLon) / 2; + var lat = (fromLat + toLat) / 2; + var from = L.latLng(fromLat, fromLon); + var to = L.latLng(toLat, toLon); + var bounds = from.distanceTo(to); + + L.marker([lat, lon], { + icon: L.divIcon({ + className: 'distance', + html: '两点之间距离为:{0}公里'.format(Math.round((bounds / 1000) * 100) / 100) + }) + }).addTo(features); + }; + + this.AddPoints = function (features, points, weight, color, fillColor) { + $(points).each(function (index, point) { + L.circleMarker([point[1], point[0]], { + opacity: 1, + weight: weight, + color: color, + fillColor: fillColor, + fillOpacity: 1, + radius: 4, + className: 'point point{0}'.format(point[1].toString().split(".").join("")) + }).addTo(features); + }.bind(this)); + }; + this.GetWindFileName = function () { var value = $('#release-date').datebox('getValue'); var time = moment(value, 'YYYY/MM/DD HH:mm'); @@ -294,4 +386,65 @@ var Map = function (parent) { if (value <= 1000) return 'rgb(192, 28, 36)'; }; + + this.LoadInfoPoint = function () { + $.ajax({ + type: "POST", + dataType: 'text', + url: '/Point/Query', + success: function (result) { + var data = JSON.parse(result); + data.forEach(function (item, index) { + var point = { + lat: item.Latitude, + lng: item.Longitude + }; + this.AddInfoPoint(point, item.Title, item.Icon, item.Id) + }.bind(this)) + }.bind(this) + }); + }; + + this.onMarkClick = function () { + this.isMark = true; + + $('#map').css('cursor', 'crosshair'); + this.DrewInfoPoint(); + }; + + this.DrewInfoPoint = function () { + this.map.on('click', function (e) { + if (this.isMark) + this.InfoPoint.ShowDialog(e.latlng); + else + return; + }.bind(this)) + }; + + this.AddInfoPoint = function (point, title, icon, id) { + let label = '

{1}

'.format(id, title, id, icon.slice(0, 1)); + L.marker([point.lat, point.lng], { + icon: L.divIcon({ + className: 'info-point-content', + html: label + }) + }).addTo(this.map); + + var button = $('#close-btn{0}'.format(id)); + button.on('click', this.RemoveInfoPoint.bind(this, id)); + }; + + this.RemoveInfoPoint = function (id, event) { + $.ajax({ + type: "POST", + dataType: 'text', + url: '/Point/Delete', + data: { + id: id, + }, + success: function () { + $('.info-point{0}'.format(id)).hide(); + }.bind(this) + }); + } }; \ No newline at end of file diff --git a/04.系统编码/App/Views/Menggu/Index.cshtml b/04.系统编码/App/Views/Menggu/Index.cshtml index 567036c..6838103 100644 --- a/04.系统编码/App/Views/Menggu/Index.cshtml +++ b/04.系统编码/App/Views/Menggu/Index.cshtml @@ -4,6 +4,7 @@ @section styles { + }
@@ -14,8 +15,12 @@
时间标签
+ 信息点标绘... + 画线... + 清除... 导出图片... +
@@ -35,6 +40,50 @@
+
+
+
+

添加信息点

+
+ +
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+ + +
+
+
+
@@ -84,6 +133,7 @@ @section scripts { + @@ -91,6 +141,7 @@ + } \ No newline at end of file