|
|
@ -58,6 +58,8 @@ var Map = function (parent) { |
|
|
|
this.isSwitch = false; |
|
|
|
this.isSelected = false; |
|
|
|
this.showTimeTags = true; |
|
|
|
this.lineColor = null; |
|
|
|
this.lineWidth = null; |
|
|
|
this.currentButton = { |
|
|
|
cursorSelected: true, |
|
|
|
markSelected: true, |
|
|
@ -86,6 +88,7 @@ var Map = function (parent) { |
|
|
|
this.InitCapture(); |
|
|
|
this.LoadWindTemplate(); |
|
|
|
this.LoadInfoPoint(); |
|
|
|
this.GetLineConfig(); |
|
|
|
this.InfoPoint.Startup(); |
|
|
|
this.SelectPoint.Startup(); |
|
|
|
this.LatLngSwitch.Startup(); |
|
|
@ -141,6 +144,23 @@ var Map = function (parent) { |
|
|
|
return parseFloat(value).toFixed(6) |
|
|
|
} |
|
|
|
|
|
|
|
this.GetLineConfig = function () { |
|
|
|
$.ajax({ |
|
|
|
type: "POST", |
|
|
|
dataType: 'json', |
|
|
|
url: '/Config/All', |
|
|
|
success: function (result) { |
|
|
|
console.log() |
|
|
|
this.lineColor = result.find(function (item) { |
|
|
|
return item.Id === 'line-color'; |
|
|
|
}).Value; |
|
|
|
this.lineWidth = result.find(function (item) { |
|
|
|
return item.Id === 'line-width'; |
|
|
|
}).Value; |
|
|
|
}.bind(this) |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
this.OnParticleButtonClick = function () { |
|
|
|
// Toggle switch on/off
|
|
|
|
var parent = $(event.target).parent(); |
|
|
@ -368,8 +388,8 @@ var Map = function (parent) { |
|
|
|
this.AddData(features, result.backward.average); |
|
|
|
this.AddData(features, result.forward.average); |
|
|
|
|
|
|
|
this.AddPolyline(features, result.backward.points, '#ffffff', '#cccccc'); |
|
|
|
this.AddPolyline(features, result.forward.points, '#ffffff', '#cccccc'); |
|
|
|
this.AddPolyline(features, result.backward.points, this.lineColor, '#cccccc', this.lineWidth); |
|
|
|
this.AddPolyline(features, result.forward.points, this.lineColor, '#cccccc', this.lineWidth); |
|
|
|
|
|
|
|
this.AddCenter(features, param); |
|
|
|
this.AddPoints(features, result.backward.points, 0.5, '#000000', '#ffffff'); |
|
|
@ -384,7 +404,7 @@ var Map = function (parent) { |
|
|
|
var features = new L.FeatureGroup(); |
|
|
|
features.name = name; |
|
|
|
|
|
|
|
this.AddPolyline(features, result, 'blue', '#000000'); |
|
|
|
this.AddPolyline(features, result, 'blue', '#000000', 2); |
|
|
|
this.AddPoints(features, result, 1, 'blue', '#ffffff'); |
|
|
|
this.AddLabels(features, result, 'compare'); |
|
|
|
|
|
|
@ -404,7 +424,7 @@ var Map = function (parent) { |
|
|
|
}.bind(this)); |
|
|
|
}; |
|
|
|
|
|
|
|
this.AddPolyline = function (features, points, color, fillColor) { |
|
|
|
this.AddPolyline = function (features, points, color, fillColor, weight) { |
|
|
|
var polyline = []; |
|
|
|
$(points).each(function (index, point) { |
|
|
|
polyline.push([point[1], point[0]]); |
|
|
@ -412,7 +432,7 @@ var Map = function (parent) { |
|
|
|
L.polyline(polyline, { |
|
|
|
fillColor: fillColor, |
|
|
|
color: color, |
|
|
|
weight: 2 |
|
|
|
weight: weight |
|
|
|
}).addTo(features); |
|
|
|
}; |
|
|
|
|
|
|
@ -698,6 +718,7 @@ var Map = function (parent) { |
|
|
|
this.LoadInfoPoint = function () { |
|
|
|
$.ajax({ |
|
|
|
type: "POST", |
|
|
|
async: false, |
|
|
|
dataType: 'text', |
|
|
|
url: '/Point/Query', |
|
|
|
data: { |
|
|
|