diff --git a/src/views/am/area_rail_form.vue b/src/views/am/area_rail_form.vue index c8964073..7c25c0d2 100644 --- a/src/views/am/area_rail_form.vue +++ b/src/views/am/area_rail_form.vue @@ -3,6 +3,7 @@ :title="areaName+'围栏设置'" v-model="visible" destroy-on-close + :size="'80%'" @closed="closeDrawer" > { - console.log('Map loadComplete!'); - var pointMarker = new jsmap.JSPointMarker({ - color: '#00FF00', //填充颜色 - size: 10, //尺寸 - position: new jsmap.JSPoint(114.628074820438, 38.8157131095379, 0), //坐标 - floorId: 2, //楼层id,默认为1(地面) - outlineColor: '#CD5C5C', //边线颜色 - outlineWidth: 2, //边线宽 - depthTest: true, //是否开启深度检测 - show: true, //是否显示 - allowPicking: true, //是否允许点击 - displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围 - nearFarScale: new jsmap.JSNearFarScale(0.0, 10.0, 500, 0.5), //比例缩放 - callback: (node) => { - console.log(node); - }//回调事件 - }); - window.map.addMarker(pointMarker); let drawTool2 = new jsmap.JSDrawToolControl({ position: jsmap.JSControlPosition.RIGHT_TOP, //画图工具在容器中的相对位置,当前为右上 offset: { @@ -133,9 +116,9 @@ drawMode: jsmap.JSDrawMode.POLYGON, //画图类型POINT:画点 POLYLINE:画线 POLYGON:画面 //画图结束的回调,返回所画的面信息 callback: (feature) => { - console.log('add', feature); + /*console.log('add', feature); console.log(feature.properties);//type:POLYGON;id:"";name:"";floorNo:"";floorId:"" - console.log(feature.geometry);//feature.geometry.coordinates:[[],[]]面数组 + console.log(feature.geometry);//feature.geometry.coordinates:[[],[]]面数组*/ this.coordinates.floorNo = feature.properties.floorNo; this.coordinates.floorId = feature.properties.floorId; that.points = feature.geometry.coordinates[0]; @@ -168,9 +151,7 @@ if(points.length>0){ that.isSaveing = true; that.coordinates.color = 'rgba(255,0,0,.4)'; - debugger; points.forEach(item=>{ - debugger; let coordinate = {x:parseFloat(item[0]),y:parseFloat(item[1])}; let pixel = tool.mapToScreenCoordinate(coordinate); pointXY.push(pixel); diff --git a/src/views/am/vchannel_view.vue b/src/views/am/vchannel_view.vue index 393262b8..9a6f721a 100644 --- a/src/views/am/vchannel_view.vue +++ b/src/views/am/vchannel_view.vue @@ -128,24 +128,7 @@ }); window.map.openMapById('0000'); window.map.on('loadComplete', e => { - console.log('Map loadComplete!'); - var pointMarker = new jsmap.JSPointMarker({ - color: '#00FF00', //填充颜色 - size: 10, //尺寸 - position: new jsmap.JSPoint(114.628074820438, 38.8157131095379, 0), //坐标 - floorId: 2, //楼层id,默认为1(地面) - outlineColor: '#CD5C5C', //边线颜色 - outlineWidth: 2, //边线宽 - depthTest: true, //是否开启深度检测 - show: true, //是否显示 - allowPicking: true, //是否允许点击 - displayCondition: new jsmap.JSDisplayCondition(0.0, 1000), //可见范围 - nearFarScale: new jsmap.JSNearFarScale(0.0, 10.0, 500, 0.5), //比例缩放 - callback: (node) => { - console.log(node); - }//回调事件 - }); - window.map.addMarker(pointMarker); + // console.log('Map loadComplete!'); var drawTool = new jsmap.JSDrawToolControl({ position: jsmap.JSControlPosition.RIGHT_TOP, //画图工具在容器中的相对位置,当前为右上 offset: { @@ -156,12 +139,10 @@ //画图结束的回调,返回所画的点的信息 callback: (feature) => { - debugger; - console.log('add', feature); - console.log(feature.properties);//type:POINT;id:"";name:"";floorNo:"";floorId:"" - console.log(feature.geometry);//type:POINT;coordinates:[114.63028499839209,38.81195080123784,0] + //console.log('add', feature); + //console.log(feature.properties);//type:POINT;id:"";name:"";floorNo:"";floorId:"" + //console.log(feature.geometry);//type:POINT;coordinates:[114.63028499839209,38.81195080123784,0] this.form.location = feature.geometry.coordinates; - debugger; }, //移除相应点的回调,返回相应点信息 removeCallback: (feature) => { @@ -196,7 +177,7 @@ submit() { let that = this; let item = this.form.location; - console.log(this.form.location); + //console.log(this.form.location); that.form.code = that.channelCode; that.form.type = that.channelType; that.form.name = that.channelName;