|
@@ -17,6 +17,70 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <div id="toolbar-heat" v-if="isheatPlotting" class="panel panel-primary"
|
|
|
+ style="position:absolute;z-index: 9999; padding: 1rem; bottom:3rem;right: 1rem; border-radius: 4px; width: fit-content;height:fit-content;overflow-y:scroll;background:#040b1f">
|
|
|
+ <div class="panel-body content">
|
|
|
+ <div class="panel">
|
|
|
+ <div class="input-group">
|
|
|
+ <span class="input-group-addon">风向</span>
|
|
|
+ <select class="form-control" style="width:auto" id="heatNums">
|
|
|
+ <option value="1">南风</option>
|
|
|
+ <option value="31">西南风</option>
|
|
|
+ <option value="41">东南风</option>
|
|
|
+ <option value="2">北风</option>
|
|
|
+ <option value="32">西北风</option>
|
|
|
+ <option value="42">东北风</option>
|
|
|
+ <option value="3">西风</option>
|
|
|
+ <option value="4">东风</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="input-group">
|
|
|
+ <span class="input-group-addon">风速</span>
|
|
|
+ <input type="text" class="form-control" id="heatNums1" value="6"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="input-group">
|
|
|
+ <span class="input-group-addon">温度</span>
|
|
|
+ <input type="text" class="form-control" id="heatNums2" value="10℃"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="input-group">
|
|
|
+ <span class="input-group-addon">湿度</span>
|
|
|
+ <input type="text" class="form-control" id="heatNums3" value="6%RH"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="input-group">
|
|
|
+ <span class="input-group-addon">持续时间</span>
|
|
|
+ <input type="text" class="form-control" id="heatNums4" value="60分钟"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="input-group">
|
|
|
+ <span class="input-group-addon">植被类型</span>
|
|
|
+ <select class="form-control" style="width:auto" id="heatNums5">
|
|
|
+ <option value="1">针叶林</option>
|
|
|
+ <option value="31">落叶林</option>
|
|
|
+ </select>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="panel">
|
|
|
+ <div class="input-group">
|
|
|
+ <span class="input-group-addon">大气压</span>
|
|
|
+ <input type="text" class="form-control" id="heatNums6" value="101.325kPa"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="panel">
|
|
|
+ <el-button type="success" @click="createHeatPoints">分析</el-button>
|
|
|
+ <el-button type="success" @click="clearHeatPoints">重置</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -61,7 +125,11 @@
|
|
|
isEditableLayers: false, //绘图控件
|
|
|
drawControl: null, //绘图控件
|
|
|
deckglLayer: null, //图层Layer
|
|
|
- deckglLayerList: [] //图层Layer(数组)
|
|
|
+ deckglLayerList: [], //图层Layer(数组)
|
|
|
+ heatMapLayer: [], //火灾蔓延图层Layer
|
|
|
+ isheatPlotting: false,//火灾蔓延
|
|
|
+ heat_lat: 0, //火灾蔓延经纬度
|
|
|
+ heat_lng: 0 //火灾蔓延经纬度
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -247,45 +315,326 @@
|
|
|
showLineLatLng: null
|
|
|
},
|
|
|
methods: {
|
|
|
- loadHeatMap: async function() {
|
|
|
- var heatNumbers = 150, heatRadius = 30;
|
|
|
- var num = parseInt(heatNumbers);
|
|
|
- num = (num > 0) ? num : 0;
|
|
|
- var radius = parseInt(heatRadius);
|
|
|
- radius = (radius > 0) ? radius : 0;
|
|
|
- var heatPoints = [];
|
|
|
- for (var i = 0; i < num; i++) {
|
|
|
- heatPoints[i] = [Math.random() * 0.28 + 42, Math.random() * 0.5 + 125, Math.random() * 80];
|
|
|
+ /** ----------------------------------火势蔓延 开始------------------------------------- */
|
|
|
+ // initEditView: function() {
|
|
|
+ // var that = this
|
|
|
+ // var infoView = window.L.control({ position: 'topright' })
|
|
|
+ // infoView.onAdd = function() {
|
|
|
+ // that._div = L.DomUtil.create('div', 'editPane')
|
|
|
+ // that._div.style.width = '236px'
|
|
|
+ // that._div.innerHTML = '<div id="toolbar" class="panel panel-primary">' +
|
|
|
+ // '<div class="panel-heading">' +
|
|
|
+ // '<h5 class="panel-title text-center">' + resources.text_fastHeatMapLayer + '</h5></div>' +
|
|
|
+ // '<div class="panel-body content">' +
|
|
|
+ // '<div class="panel">' +
|
|
|
+ // '<div class="input-group">' +
|
|
|
+ // '<span class="input-group-addon">风向</span>' +
|
|
|
+ // '<select class="form-control" style="width:auto" id="heatNums">' +
|
|
|
+ // '<option value="1" >南风</option>' +
|
|
|
+ // '<option value="2" >北风</option>' +
|
|
|
+ // '<option value="3" >西风</option>' +
|
|
|
+ // '<option value="4" >东风</option>' +
|
|
|
+ // '</select>' +
|
|
|
+ // '</div>' +
|
|
|
+ // '</div>' +
|
|
|
+ // '<div class="panel">' +
|
|
|
+ // '<div class="input-group">' +
|
|
|
+ // '<span class="input-group-addon">风速</span>' +
|
|
|
+ // '<input type="text" class="form-control" id="heatNums1" value="20"/>' +
|
|
|
+ // '</div>' +
|
|
|
+ // '</div>' +
|
|
|
+ //
|
|
|
+ // '<input type="button" class="btn btn-default" value="' + resources.btn_startDraw + '" onclick ="'+that.createHeatPoints()+'"/> ' +
|
|
|
+ // '<input type="button" class="btn btn-default" value="' + resources.text_input_value_clear + '" onclick ="'+that.clearHeatPoints()+'"/>' +
|
|
|
+ // '</div>' +
|
|
|
+ // '</div>'
|
|
|
+ // that.handleMapEvent(that._div, that.map)
|
|
|
+ // return that._div
|
|
|
+ // }
|
|
|
+ // infoView.addTo(that.map)
|
|
|
+ // },
|
|
|
+ // handleMapEvent: function(div, map) {
|
|
|
+ // let that = this
|
|
|
+ // if (!div || !map) {
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ // div.addEventListener('mouseover', function() {
|
|
|
+ // that.map.dragging.disable()
|
|
|
+ // that.map.scrollWheelZoom.disable()
|
|
|
+ // that.map.doubleClickZoom.disable()
|
|
|
+ // })
|
|
|
+ // div.addEventListener('mouseout', function() {
|
|
|
+ // that.map.dragging.enable()
|
|
|
+ // that.map.scrollWheelZoom.enable()
|
|
|
+ // that.map.doubleClickZoom.enable()
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ showheatPlotting: function(heat_lat, heat_lng) {
|
|
|
+ this.heat_lat = heat_lat
|
|
|
+ this.heat_lng = heat_lng
|
|
|
+ this.isheatPlotting = true
|
|
|
+ },
|
|
|
+ createHeatPoints: function() {
|
|
|
+ let that = this
|
|
|
+ that.clearHeatPoints()
|
|
|
+ that.heatMapLayer = new window.L.supermap.heatMapLayer(
|
|
|
+ 'heatMap',
|
|
|
+ {
|
|
|
+ 'map': that.map,
|
|
|
+ 'id': 'heatmap',
|
|
|
+ 'radius': 10,
|
|
|
+// 设置图层透明度:(参数方式)
|
|
|
+ 'opacity': 0.5,
|
|
|
+ //featureWeight指定以哪个属性值为热力权重值创建热力图:
|
|
|
+ 'featureWeight': 'value'
|
|
|
+ }
|
|
|
+ )
|
|
|
+ var heatNums = parseInt($('#heatNums').val())
|
|
|
+ //热力半径单位不使用用地理单位
|
|
|
+ that.heatMapLayer.useGeoUnit = true
|
|
|
+ that.heatMapLayer.radius = 0.01
|
|
|
+
|
|
|
+ var features = []
|
|
|
+
|
|
|
+ switch (heatNums) {
|
|
|
+ case 1://南风
|
|
|
+ features = that.getPointArray1()
|
|
|
+ break
|
|
|
+ case 31://西南风
|
|
|
+ features = that.getPointArray3_1()
|
|
|
+ break
|
|
|
+ case 41://东南风
|
|
|
+ features = that.getPointArray4_1()
|
|
|
+ break
|
|
|
+ case 2://北风
|
|
|
+ features = that.getPointArray2()
|
|
|
+ break
|
|
|
+ case 32://西北风
|
|
|
+ features = that.getPointArray3_2()
|
|
|
+ break
|
|
|
+ case 42://东北风
|
|
|
+ features = that.getPointArray4_2()
|
|
|
+ break
|
|
|
+ case 3://西风
|
|
|
+ features = that.getPointArray3()
|
|
|
+ break
|
|
|
+ case 4://东风
|
|
|
+ features = that.getPointArray4()
|
|
|
+ break
|
|
|
+ }
|
|
|
+
|
|
|
+ //加载heatMapFeature格式数据:
|
|
|
+ that.heatMapLayer.addFeatures(features)
|
|
|
+ that.heatMapLayer.addTo(that.map)
|
|
|
+
|
|
|
+ },
|
|
|
+
|
|
|
+ clearHeatPoints: function() {
|
|
|
+ let that = this
|
|
|
+ if (that.heatMapLayer) {
|
|
|
+ that.map.removeLayer(that.heatMapLayer)
|
|
|
+ that.heatMapLayer = null
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ getPointArray1: function() {
|
|
|
+ var heatNums1 = parseInt($('#heatNums1').val())
|
|
|
+ var mLon = this.heat_lng, mLat = this.heat_lat
|
|
|
+ var points = []
|
|
|
+ for (var i = 0; i < parseInt(heatNums1 / 3); i++) {
|
|
|
+ mLat = this.accAdd(mLat, 0.005)
|
|
|
+ points[i] = new window.L.supermap.heatMapFeature(L.point(mLon, mLat), {
|
|
|
+ 'value': 2000 - (i * Math.random())
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return points
|
|
|
+ },
|
|
|
+ getPointArray3_1: function() {
|
|
|
+ var heatNums1 = parseInt($('#heatNums1').val())
|
|
|
+ var mLon = this.heat_lng, mLat = this.heat_lat
|
|
|
+ var points = []
|
|
|
+ for (var i = 0; i < parseInt(heatNums1 / 3); i++) {
|
|
|
+ mLat = this.accAdd(mLat, 0.005)
|
|
|
+ mLon = this.accAdd(mLon, 0.005)
|
|
|
+ points[i] = new window.L.supermap.heatMapFeature(L.point(mLon, mLat), {
|
|
|
+ 'value': 2000 - (i * Math.random())
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return points
|
|
|
+ },
|
|
|
+ getPointArray4_1: function() {
|
|
|
+ var heatNums1 = parseInt($('#heatNums1').val())
|
|
|
+ var mLon = this.heat_lng, mLat = this.heat_lat
|
|
|
+ var points = []
|
|
|
+ for (var i = 0; i < parseInt(heatNums1 / 3); i++) {
|
|
|
+ mLat = this.accAdd(mLat, 0.005)
|
|
|
+ mLon = this.accSub(mLon, 0.005)
|
|
|
+ points[i] = new window.L.supermap.heatMapFeature(L.point(mLon, mLat), {
|
|
|
+ 'value': 2000 - (i * Math.random())
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return points
|
|
|
+ },
|
|
|
+ getPointArray2: function() {
|
|
|
+ var heatNums1 = parseInt($('#heatNums1').val())
|
|
|
+ var mLon = this.heat_lng, mLat = this.heat_lat
|
|
|
+ var points = []
|
|
|
+ for (var i = 0; i < parseInt(heatNums1 / 3); i++) {
|
|
|
+ mLat = this.accSub(mLat, 0.005)
|
|
|
+ points[i] = new window.L.supermap.heatMapFeature(L.point(mLon, mLat), {
|
|
|
+ 'value': 2000 - (i * Math.random())
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return points
|
|
|
+ },
|
|
|
+ getPointArray3_2: function() {
|
|
|
+ var heatNums1 = parseInt($('#heatNums1').val())
|
|
|
+ var mLon = this.heat_lng, mLat = this.heat_lat
|
|
|
+ var points = []
|
|
|
+ for (var i = 0; i < parseInt(heatNums1 / 3); i++) {
|
|
|
+ mLat = this.accSub(mLat, 0.005)
|
|
|
+ mLon = this.accAdd(mLon, 0.005)
|
|
|
+ points[i] = new window.L.supermap.heatMapFeature(L.point(mLon, mLat), {
|
|
|
+ 'value': 2000 - (i * Math.random())
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return points
|
|
|
+ },
|
|
|
+ getPointArray4_2: function() {
|
|
|
+ var heatNums1 = parseInt($('#heatNums1').val())
|
|
|
+ var mLon = this.heat_lng, mLat = this.heat_lat
|
|
|
+ var points = []
|
|
|
+ for (var i = 0; i < parseInt(heatNums1 / 3); i++) {
|
|
|
+ mLat = this.accSub(mLat, 0.005)
|
|
|
+ mLon = this.accSub(mLon, 0.005)
|
|
|
+ points[i] = new window.L.supermap.heatMapFeature(L.point(mLon, mLat), {
|
|
|
+ 'value': 2000 - (i * Math.random())
|
|
|
+ })
|
|
|
}
|
|
|
+ return points
|
|
|
+ },
|
|
|
+ getPointArray3: function() {
|
|
|
+ var heatNums1 = parseInt($('#heatNums1').val())
|
|
|
+ var mLon = this.heat_lng, mLat = this.heat_lat
|
|
|
+ var points = []
|
|
|
+ for (var i = 0; i < parseInt(heatNums1 / 3); i++) {
|
|
|
+ mLon = this.accAdd(mLon, 0.005)
|
|
|
+ points[i] = new window.L.supermap.heatMapFeature(L.point(mLon, mLat), {
|
|
|
+ 'value': 2000 - (i * Math.random())
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return points
|
|
|
+
|
|
|
+ },
|
|
|
+ getPointArray4: function() {
|
|
|
+ var heatNums1 = parseInt($('#heatNums1').val())
|
|
|
+ var mLon = this.heat_lng, mLat = this.heat_lat
|
|
|
+ var points = []
|
|
|
+ for (var i = 0; i < parseInt(heatNums1 / 3); i++) {
|
|
|
+ mLon = this.accSub(mLon, 0.005)
|
|
|
+ points[i] = new window.L.supermap.heatMapFeature(L.point(mLon, mLat), {
|
|
|
+ 'value': 2000 - (i * Math.random())
|
|
|
+ })
|
|
|
+ }
|
|
|
+ return points
|
|
|
+
|
|
|
+ },
|
|
|
+ //加法函数,用来得到精确的加法结果
|
|
|
+//说明:javascript的加法结果会有误差,在两个浮点数相加的时候会比较明显。这个函数返回较为精确的加法结果。
|
|
|
+//调用:accAdd(arg1,arg2)
|
|
|
+//返回值:arg1加上arg2的精确结果
|
|
|
+ accAdd: function(arg1, arg2) {
|
|
|
+ var r1, r2, m, c
|
|
|
+ try {
|
|
|
+ r1 = arg1.toString().split('.')[1].length
|
|
|
+ } catch (e) {
|
|
|
+ r1 = 0
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ r2 = arg2.toString().split('.')[1].length
|
|
|
+ } catch (e) {
|
|
|
+ r2 = 0
|
|
|
+ }
|
|
|
+ c = Math.abs(r1 - r2)
|
|
|
+ m = Math.pow(10, Math.max(r1, r2))
|
|
|
+ if (c > 0) {
|
|
|
+ var cm = Math.pow(10, c)
|
|
|
+ if (r1 > r2) {
|
|
|
+ arg1 = Number(arg1.toString().replace('.', ''))
|
|
|
+ arg2 = Number(arg2.toString().replace('.', '')) * cm
|
|
|
+ } else {
|
|
|
+ arg1 = Number(arg1.toString().replace('.', '')) * cm
|
|
|
+ arg2 = Number(arg2.toString().replace('.', ''))
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ arg1 = Number(arg1.toString().replace('.', ''))
|
|
|
+ arg2 = Number(arg2.toString().replace('.', ''))
|
|
|
+ }
|
|
|
+ return (arg1 + arg2) / m
|
|
|
+ },
|
|
|
+ /**
|
|
|
+ ** 减法函数,用来得到精确的减法结果
|
|
|
+ ** 说明:javascript的减法结果会有误差,在两个浮点数相减的时候会比较明显。这个函数返回较为精确的减法结果。
|
|
|
+ ** 调用:accSub(arg1,arg2)
|
|
|
+ ** 返回值:arg1加上arg2的精确结果
|
|
|
+ **/
|
|
|
+ accSub: function(arg1, arg2) {
|
|
|
+ var r1, r2, m, n
|
|
|
+ try {
|
|
|
+ r1 = arg1.toString().split('.')[1].length
|
|
|
+ } catch (e) {
|
|
|
+ r1 = 0
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ r2 = arg2.toString().split('.')[1].length
|
|
|
+ } catch (e) {
|
|
|
+ r2 = 0
|
|
|
+ }
|
|
|
+ m = Math.pow(10, Math.max(r1, r2)) //last modify by deeka //动态控制精度长度
|
|
|
+ n = r1 >= r2 ? r1 : r2
|
|
|
+ return ((arg1 * m - arg2 * m) / m).toFixed(n)
|
|
|
+ },
|
|
|
+ /** ----------------------------------火势蔓延 结束------------------------------------- */
|
|
|
+ /** ----------------------------------热力图 结束------------------------------------- */
|
|
|
+ loadHeatMap: async function(points) {
|
|
|
+ var heatNumbers = 150, heatRadius = 30
|
|
|
+ var num = parseInt(heatNumbers)
|
|
|
+ num = (num > 0) ? num : 0
|
|
|
+ var radius = parseInt(heatRadius)
|
|
|
+ radius = (radius > 0) ? radius : 0
|
|
|
+ var heatPoints = points
|
|
|
+ // for (var i = 0; i < num; i++) {
|
|
|
+ // heatPoints[i] = [Math.random() * 0.28 + 42, Math.random() * 0.5 + 125, Math.random() * 80]
|
|
|
+ // }
|
|
|
var resultLayer = window.L.heatLayer(heatPoints, {
|
|
|
radius: radius,
|
|
|
minOpacity: 0.5
|
|
|
- }).addTo(this.map);
|
|
|
+ }).addTo(this.map)
|
|
|
},
|
|
|
+ /** ----------------------------------热力图 开始------------------------------------- */
|
|
|
clearM: async function(isAggregation) { //清理地图标点
|
|
|
if (isAggregation) {
|
|
|
if (this.isAggregationMyGroup != undefined && this.isAggregationMyGroup != false) {
|
|
|
this.isAggregationMyGroup.clearLayers()
|
|
|
}
|
|
|
- if (this.isAggregationLayers != null && this.isAggregationLayers.length > 0) {
|
|
|
- this.map.removeLayer(this.isAggregationLayers)
|
|
|
- this.isAggregationLayers = []
|
|
|
- this.radiusLayers = []
|
|
|
- this.isAggregationLayers = window.L.markerClusterGroup({
|
|
|
- //设置为true时显示聚类所占据的范围
|
|
|
- showCoverageOnHover: true,
|
|
|
- //设置为true时会向低一级聚类缩放
|
|
|
- zoomToBoundsOnClick: true,
|
|
|
- //增加点位时增加聚合动画(否则会出问题)
|
|
|
- animateAddingMarkers: true,
|
|
|
- //最大缩放级别点击聚合图标展开图标
|
|
|
- spiderfyOnMaxZoom: true
|
|
|
- })
|
|
|
- }
|
|
|
+ this.map.removeLayer(this.isAggregationLayers)
|
|
|
+ this.isAggregationLayers = []
|
|
|
+ this.radiusLayers = []
|
|
|
+ this.isAggregationLayers = window.L.markerClusterGroup({
|
|
|
+ //设置为true时显示聚类所占据的范围
|
|
|
+ showCoverageOnHover: true,
|
|
|
+ //设置为true时会向低一级聚类缩放
|
|
|
+ zoomToBoundsOnClick: true,
|
|
|
+ //增加点位时增加聚合动画(否则会出问题)
|
|
|
+ animateAddingMarkers: true,
|
|
|
+ //最大缩放级别点击聚合图标展开图标
|
|
|
+ spiderfyOnMaxZoom: true
|
|
|
+ })
|
|
|
} else {
|
|
|
if (this.myGroup != undefined && this.myGroup != false) {
|
|
|
this.myGroup.clearLayers()
|
|
|
}
|
|
|
+ this.map.removeLayer(this.layers)
|
|
|
this.layers = []
|
|
|
}
|
|
|
},
|
|
@@ -657,7 +1006,7 @@
|
|
|
})
|
|
|
let markerClick = window.L.marker([markersList[i].lat, markersList[i].lng], {
|
|
|
icon: icon
|
|
|
- }).addTo(this.map)
|
|
|
+ })
|
|
|
if (markersList[i].bindPopupHtml != null && markersList[i].bindPopupHtml !== '') {
|
|
|
let html = markersList[i].bindPopupHtml
|
|
|
if (keepBindPopup) {
|
|
@@ -691,14 +1040,15 @@
|
|
|
if (isAggregation) {
|
|
|
_that.isAggregationLayers.addLayer(markerClick)
|
|
|
_that.isAggregationMyGroup = window.L.layerGroup(_that.isAggregationLayers)
|
|
|
- this.map.addLayer(_that.isAggregationLayers)
|
|
|
} else {
|
|
|
_that.layers.push(markerClick)
|
|
|
_that.myGroup = window.L.layerGroup(_that.layers)
|
|
|
- this.map.addLayer(_that.myGroup)
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
+ if (_that.myGroup != undefined && _that.myGroup != false) {
|
|
|
+ _that.map.addLayer(_that.myGroup)
|
|
|
+ }
|
|
|
+ _that.map.addLayer(_that.isAggregationLayers)
|
|
|
},
|
|
|
setMarkersByType: function(markersList, type) { //地图标点(根据类型,可取消落点 clearMByType方法)
|
|
|
const _that = this
|
|
@@ -870,13 +1220,13 @@
|
|
|
}
|
|
|
},
|
|
|
dropLocation: function(lat, lng) { //落点定位
|
|
|
-
|
|
|
- this.map.flyTo([lat, lng], 14, { duration: 2 })
|
|
|
-
|
|
|
- // this.controlLevel(12)
|
|
|
- // setTimeout(() => {
|
|
|
- // this.map.panTo([lat, lng])
|
|
|
- // }, 1000)
|
|
|
+ this.map.flyTo([lat, lng], 13, { duration: 2 })
|
|
|
+ },
|
|
|
+ dropLocation10: function(lat, lng) { //落点定位
|
|
|
+ this.map.flyTo([lat, lng], 10, { duration: 2 })
|
|
|
+ },
|
|
|
+ dropLocation5: function(lat, lng) { //落点定位
|
|
|
+ this.map.flyTo([lat, lng], 5, { duration: 2 })
|
|
|
},
|
|
|
controlLevel: function(level) { //控制地图缩放级别
|
|
|
this.map.setZoom(level)
|
|
@@ -938,6 +1288,32 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
@import '@/assets/styles/base.scss';
|
|
|
+ .panel{
|
|
|
+ margin-bottom: .5rem;
|
|
|
+ button{
|
|
|
+ margin-top: .5rem;
|
|
|
+ }
|
|
|
+ .input-group{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: row;
|
|
|
+ align-items: center;
|
|
|
+ .input-group-addon{
|
|
|
+ color: $inBlue;
|
|
|
+ width: 3rem;
|
|
|
+ text-align: right;
|
|
|
+
|
|
|
+ }
|
|
|
+ .form-control{
|
|
|
+ padding: 0 .3rem;
|
|
|
+ margin-left: .5rem;
|
|
|
+ height: 1.5rem;
|
|
|
+ line-height: 1.5rem;
|
|
|
+ background-color: #112543;
|
|
|
+ color: $inBlue;
|
|
|
+ border: 1px $searchBorder;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.button-group {
|
|
|
button {
|