Commit 00d7b08a by wanghao

同步代码

parent 35f0a474
/** /**
* Mars3D三维可视化平台 mars3d * Mars3D三维可视化平台 mars3d
* *
* 版本信息:v3.6.16 * 版本信息:v3.6.17
* 编译日期:2023-12-10 22:08:21 * 编译日期:2023-12-17 23:57:16
* 版权所有:Copyright by 火星科技 http://mars3d.cn * 版权所有:Copyright by 火星科技 http://mars3d.cn
* 使用单位:免费公开版 ,2023-03-17 * 使用单位:免费公开版 ,2023-03-17
*/ */
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -230,7 +230,7 @@ function getGraphicName(graphic) { ...@@ -230,7 +230,7 @@ function getGraphicName(graphic) {
if (graphic.attr.remark) { if (graphic.attr.remark) {
return `${graphic.type} - ${graphic.attr.remark}` return `${graphic.type} - ${graphic.attr.remark}`
} }
if (graphic?.style?.label?.text) { if (graphic?.style?.label?.text && graphic.style.label.text !== "0") {
return `${graphic.type} - ${graphic.style.label.text}` return `${graphic.type} - ${graphic.style.label.text}`
} }
......
...@@ -23,8 +23,11 @@ ...@@ -23,8 +23,11 @@
} }
.ant-modal-content { .ant-modal-content {
background-color: transparent; background-color: transparent;
padding-bottom: 10px; padding: 0px 0px 10px 0px;
.mars-msg-bg(); .mars-msg-bg();
.ant-modal-confirm-paragraph {
max-width: 100%;
}
} }
.ant-modal-body { .ant-modal-body {
padding: 0; padding: 0;
......
// 功能提示和已知问题提示框 // 功能提示和已知问题提示框
.mars-notify-message.ant-notification-notice { .mars-notify-message.ant-notification-notice {
right: 30px !important; right: 30px !important;
padding: 0; padding: 0 !important;
background: none; background: none;
.mars-msg-bg(); .mars-msg-bg();
.ant-notification-notice-message { .ant-notification-notice-message {
font-size: 16px; font-size: 16px;
margin: 0; margin: 0;
.mars-msg-title(); .mars-msg-title();
margin-inline-start: 0px !important;
} }
.ant-notification-notice-description { .ant-notification-notice-description {
color: @mars-base-color; color: @mars-base-color;
...@@ -21,3 +22,7 @@ ...@@ -21,3 +22,7 @@
right: 10px; right: 10px;
} }
} }
.ant-notification-notice-wrapper {
background: transparent !important;
}
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
background-color: @mars-select-bg; background-color: @mars-select-bg;
} }
.ant-table-tbody > tr.ant-table-placeholder {
background-color: transparent;
}
.ant-table-tbody > tr.ant-table-placeholder > td { .ant-table-tbody > tr.ant-table-placeholder > td {
background: #141414; background: #141414;
} }
...@@ -26,6 +30,11 @@ ...@@ -26,6 +30,11 @@
border: none !important; border: none !important;
background: transparent !important; background: transparent !important;
padding: 10px 10px; padding: 10px 10px;
.ant-empty-normal {
.ant-empty-description {
color: #fff;
}
}
} }
.ant-table-container { .ant-table-container {
......
...@@ -350,8 +350,11 @@ function addDemoGraphic9(graphicLayer) { ...@@ -350,8 +350,11 @@ function addDemoGraphic9(graphicLayer) {
return lastPosition return lastPosition
}, false), }, false),
style: { style: {
material: getMarsCanves(),
radius: 500, radius: 500,
materialType: mars3d.MaterialType.Image2,
materialOptions: {
image: getMarsCanves()
},
clampToGround: true clampToGround: true
}, },
attr: { remark: "示例9" }, attr: { remark: "示例9" },
...@@ -370,7 +373,6 @@ function getMarsCanves() { ...@@ -370,7 +373,6 @@ function getMarsCanves() {
const canvas = document.createElement("canvas") const canvas = document.createElement("canvas")
canvas.width = 400 canvas.width = 400
canvas.height = 400 canvas.height = 400
canvas.style = "border: 1px solid red;background:orange"
const ctx = canvas.getContext("2d") const ctx = canvas.getContext("2d")
...@@ -387,6 +389,7 @@ function getMarsCanves() { ...@@ -387,6 +389,7 @@ function getMarsCanves() {
ctx.strokeStyle = "transparent" ctx.strokeStyle = "transparent"
ctx.lineWidth = 2 ctx.lineWidth = 2
ctx.stroke() ctx.stroke()
// 绘制刻度 // 绘制刻度
const numTicks = 360 // 总刻度数 const numTicks = 360 // 总刻度数
let tickLength = 10 // 刻度长度 let tickLength = 10 // 刻度长度
...@@ -463,7 +466,7 @@ function getMarsCanves() { ...@@ -463,7 +466,7 @@ function getMarsCanves() {
ctx.strokeStyle = "blue" ctx.strokeStyle = "blue"
} }
ctx.stroke() ctx.stroke()
// // 修改刻度文本的位置 // 修改刻度文本的位置
if (i % 45 === 0 && i <= 180) { if (i % 45 === 0 && i <= 180) {
ctx.fillText(i, 0, 5) // 顺时针角度刻度数 ctx.fillText(i, 0, 5) // 顺时针角度刻度数
} else if (i % 45 === 0 && i > 180) { } else if (i % 45 === 0 && i > 180) {
...@@ -477,7 +480,7 @@ function getMarsCanves() { ...@@ -477,7 +480,7 @@ function getMarsCanves() {
} }
ctx.restore() ctx.restore()
} }
return canvas return canvas.toDataURL("image/png")
} }
function addDemoGraphic10(graphicLayer) { function addDemoGraphic10(graphicLayer) {
......
...@@ -46,9 +46,11 @@ let modelGraphic ...@@ -46,9 +46,11 @@ let modelGraphic
export function addDemoGraphic1(sensorParams) { export function addDemoGraphic1(sensorParams) {
const position = Cesium.Cartesian3.fromDegrees(sensorParams.model_x, sensorParams.model_y, sensorParams.model_z) const position = Cesium.Cartesian3.fromDegrees(sensorParams.model_x, sensorParams.model_y, sensorParams.model_z)
// 加个模型 // 加个模型
modelGraphic = new mars3d.graphic.ModelEntity({ modelGraphic = new mars3d.graphic.ModelPrimitive({
name: "卫星模型", name: "卫星模型",
position, position: position,
forwardExtrapolationType: Cesium.ExtrapolationType.HOLD,
backwardExtrapolationType: Cesium.ExtrapolationType.HOLD,
style: { style: {
url: "//data.mars3d.cn/gltf/mars/weixin.gltf", url: "//data.mars3d.cn/gltf/mars/weixin.gltf",
scale: 1, scale: 1,
...@@ -65,7 +67,9 @@ export function addDemoGraphic1(sensorParams) { ...@@ -65,7 +67,9 @@ export function addDemoGraphic1(sensorParams) {
// 视锥体 // 视锥体
const satelliteSensor = new mars3d.graphic.SatelliteSensor({ const satelliteSensor = new mars3d.graphic.SatelliteSensor({
position, position: position,
forwardExtrapolationType: Cesium.ExtrapolationType.HOLD,
backwardExtrapolationType: Cesium.ExtrapolationType.HOLD,
style: { style: {
sensorType: mars3d.graphic.SatelliteSensor.Type.Rect, sensorType: mars3d.graphic.SatelliteSensor.Type.Rect,
angle1: sensorParams.angleValue1, angle1: sensorParams.angleValue1,
...@@ -78,6 +82,7 @@ export function addDemoGraphic1(sensorParams) { ...@@ -78,6 +82,7 @@ export function addDemoGraphic1(sensorParams) {
} }
}) })
graphicLayer.addGraphic(satelliteSensor) graphicLayer.addGraphic(satelliteSensor)
eventTarget.fire("addTableData", { graphicLayer }) eventTarget.fire("addTableData", { graphicLayer })
} }
......
...@@ -20,10 +20,11 @@ export function onMounted(mapInstance) { ...@@ -20,10 +20,11 @@ export function onMounted(mapInstance) {
// 经纬网 // 经纬网
const tileLayer = new mars3d.layer.GraticuleLayer({ const tileLayer = new mars3d.layer.GraticuleLayer({
steps: [0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.0] steps: [0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 5.0, 10.0],
// lineStyle: { lineStyle: {
// color: '#ffff00', color: "#fff",
// }, height: 1000
}
// labelStyle: { // labelStyle: {
// color: "#ffff00", // color: "#ffff00",
// pixelOffset: new Cesium.Cartesian2(0, 0) // pixelOffset: new Cesium.Cartesian2(0, 0)
......
...@@ -16,6 +16,8 @@ export const mapOptions = { ...@@ -16,6 +16,8 @@ export const mapOptions = {
username: "marsgis", username: "marsgis",
styleId: "cki0adkar2b0e19mv9tpiewld", styleId: "cki0adkar2b0e19mv9tpiewld",
token: mars3d.Token.mapbox, token: mars3d.Token.mapbox,
tilesize: 256,
scaleFactor: false,
show: true show: true
}, },
{ {
......
...@@ -10,6 +10,7 @@ let bloomEffect ...@@ -10,6 +10,7 @@ let bloomEffect
export const mapOptions = { export const mapOptions = {
scene: { scene: {
center: { lat: 31.795446, lng: 117.219725, alt: 1816, heading: 15, pitch: -34 } center: { lat: 31.795446, lng: 117.219725, alt: 1816, heading: 15, pitch: -34 }
// sceneMode: 2
}, },
layers: [ layers: [
{ {
...@@ -91,6 +92,7 @@ export function onMounted(mapInstance) { ...@@ -91,6 +92,7 @@ export function onMounted(mapInstance) {
name: "合肥市建筑物", name: "合肥市建筑物",
url: "//data.mars3d.cn/3dtiles/jzw-hefei/tileset.json", url: "//data.mars3d.cn/3dtiles/jzw-hefei/tileset.json",
maximumScreenSpaceError: 1, maximumScreenSpaceError: 1,
// projectTo2D: true,
popup: [ popup: [
{ field: "objectid", name: "编号" }, { field: "objectid", name: "编号" },
{ field: "name", name: "名称" }, { field: "name", name: "名称" },
......
...@@ -86,17 +86,20 @@ function showWindLine(arr) { ...@@ -86,17 +86,20 @@ function showWindLine(arr) {
data: geojsonPoly, data: geojsonPoly,
popup: "{speed}", popup: "{speed}",
symbol: { symbol: {
type: "polygonC",
styleOptions: { styleOptions: {
fill: true, // 是否填充 fill: true, // 是否填充
color: "#ffff00", // 颜色 color: "#ffff00", // 颜色
opacity: 0.7 // 透明度 opacity: 1 // 透明度
}, },
callback: function (attr, styleOpt) { callback: function (attr, styleOpt) {
// 得到点的权重,计算落在那个色度带 // 得到点的权重,计算落在那个色度带
const val = Number(attr.speed.split("-")[0] || 0) const val = Number(attr.speed.split("-")[0] || 0)
const color = getColor(val) const color = getColor(val)
return { return {
color color: color,
height: 0,
diffHeight: val * 10000
} }
} }
} }
......
...@@ -1157,6 +1157,42 @@ const styleConfig = { ...@@ -1157,6 +1157,42 @@ const styleConfig = {
} }
}, },
{ {
name: "outlineStyle",
next: "width",
label: "边框宽度",
type: "number",
min: 0,
step: 1,
defval: 1.0,
contant: "outlineWidth",
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
}
},
{
name: "outlineStyle",
next: "materialType",
label: "边框材质",
type: "combobox",
defval: "Color",
data: [
{ label: "纯色", value: "Color", contant: "outlineColor", defval: "#fff" },
{ label: "十字间隔", value: "LineCross" },
{ label: "图片", value: "Image", defval: { image: "img/tietu/gugong.jpg" } },
{ label: "衬色线", value: "PolylineOutline" },
{ label: "光晕", value: "PolylineGlow" },
{ label: "泛光线", value: "LineBloom" },
{ label: "流动颜色", value: "LineFlowColor" },
{ label: "流动line", value: "LineFlow", defval: { image: "img/textures/fence-line.png", repeat_x: 10 } },
{ label: "流动fence", value: "LineFlow-1", defval: { image: "img/textures/fence.png", repeat_x: 10 } }
],
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
}
},
{
name: "distanceDisplayCondition", name: "distanceDisplayCondition",
label: "是否按视距显示", label: "是否按视距显示",
type: "radio", type: "radio",
...@@ -1295,6 +1331,41 @@ const styleConfig = { ...@@ -1295,6 +1331,41 @@ const styleConfig = {
return style.outline && (style.diffHeight || !style.outlineStyle) return style.outline && (style.diffHeight || !style.outlineStyle)
} }
}, },
{
name: "outlineStyle",
next: "width",
label: "边框宽度",
type: "number",
min: 0,
step: 1,
defval: 1.0,
contant: "outlineWidth",
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
}
},
{
name: "outlineStyle",
next: "materialType",
label: "边框材质",
type: "combobox",
defval: "Color",
data: [
{ label: "纯色", value: "Color", contant: "outlineColor", defval: "#fff" },
{ label: "十字间隔", value: "LineCross" },
{ label: "图片", value: "Image", defval: { image: "img/tietu/gugong.jpg" } },
{ label: "衬色线", value: "PolylineOutline" },
{ label: "光晕", value: "PolylineGlow" },
{ label: "泛光线", value: "LineBloom" },
{ label: "流动颜色", value: "LineFlowColor" },
{ label: "流动line", value: "LineFlow", defval: { image: "img/textures/fence-line.png", repeat_x: 10 } },
{ label: "流动fence", value: "LineFlow-1", defval: { image: "img/textures/fence.png", repeat_x: 10 } }
],
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
}
},
{ name: "rotationDegree", label: "旋转角度", type: "number", step: 1, defval: 0.0 }, { name: "rotationDegree", label: "旋转角度", type: "number", step: 1, defval: 0.0 },
...@@ -2695,6 +2766,41 @@ const styleConfig = { ...@@ -2695,6 +2766,41 @@ const styleConfig = {
return style.outline && (style.diffHeight || !style.outlineStyle) return style.outline && (style.diffHeight || !style.outlineStyle)
} }
}, },
{
name: "outlineStyle",
next: "width",
label: "边框宽度",
type: "number",
min: 0,
step: 1,
defval: 1.0,
contant: "outlineWidth",
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
}
},
{
name: "outlineStyle",
next: "materialType",
label: "边框材质",
type: "combobox",
defval: "Color",
data: [
{ label: "纯色", value: "Color", contant: "outlineColor", defval: "#fff" },
{ label: "十字间隔", value: "LineCross" },
{ label: "图片", value: "Image", defval: { image: "img/tietu/gugong.jpg" } },
{ label: "衬色线", value: "PolylineOutline" },
{ label: "光晕", value: "PolylineGlow" },
{ label: "泛光线", value: "LineBloom" },
{ label: "流动颜色", value: "LineFlowColor" },
{ label: "流动line", value: "LineFlow", defval: { image: "img/textures/fence-line.png", repeat_x: 10 } },
{ label: "流动fence", value: "LineFlow-1", defval: { image: "img/textures/fence.png", repeat_x: 10 } }
],
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
}
},
{ name: "rotationDegree", label: "旋转角度", type: "number", step: 1, defval: 0.0 }, { name: "rotationDegree", label: "旋转角度", type: "number", step: 1, defval: 0.0 },
{ {
...@@ -2858,7 +2964,42 @@ const styleConfig = { ...@@ -2858,7 +2964,42 @@ const styleConfig = {
type: "color", type: "color",
defval: "#ffffff", defval: "#ffffff",
show: (style) => { show: (style) => {
return style.outline return style.outline && (style.diffHeight || !style.outlineStyle)
}
},
{
name: "outlineStyle",
next: "width",
label: "边框宽度",
type: "number",
min: 0,
step: 1,
defval: 1.0,
contant: "outlineWidth",
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
}
},
{
name: "outlineStyle",
next: "materialType",
label: "边框材质",
type: "combobox",
defval: "Color",
data: [
{ label: "纯色", value: "Color", contant: "outlineColor", defval: "#fff" },
{ label: "十字间隔", value: "LineCross" },
{ label: "图片", value: "Image", defval: { image: "img/tietu/gugong.jpg" } },
{ label: "衬色线", value: "PolylineOutline" },
{ label: "光晕", value: "PolylineGlow" },
{ label: "泛光线", value: "LineBloom" },
{ label: "流动颜色", value: "LineFlowColor" },
{ label: "流动line", value: "LineFlow", defval: { image: "img/textures/fence-line.png", repeat_x: 10 } },
{ label: "流动fence", value: "LineFlow-1", defval: { image: "img/textures/fence.png", repeat_x: 10 } }
],
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
} }
}, },
...@@ -3033,6 +3174,41 @@ const styleConfig = { ...@@ -3033,6 +3174,41 @@ const styleConfig = {
return style.outline && (style.diffHeight || !style.outlineStyle) return style.outline && (style.diffHeight || !style.outlineStyle)
} }
}, },
{
name: "outlineStyle",
next: "width",
label: "边框宽度",
type: "number",
min: 0,
step: 1,
defval: 1.0,
contant: "outlineWidth",
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
}
},
{
name: "outlineStyle",
next: "materialType",
label: "边框材质",
type: "combobox",
defval: "Color",
data: [
{ label: "纯色", value: "Color", contant: "outlineColor", defval: "#fff" },
{ label: "十字间隔", value: "LineCross" },
{ label: "图片", value: "Image", defval: { image: "img/tietu/gugong.jpg" } },
{ label: "衬色线", value: "PolylineOutline" },
{ label: "光晕", value: "PolylineGlow" },
{ label: "泛光线", value: "LineBloom" },
{ label: "流动颜色", value: "LineFlowColor" },
{ label: "流动line", value: "LineFlow", defval: { image: "img/textures/fence-line.png", repeat_x: 10 } },
{ label: "流动fence", value: "LineFlow-1", defval: { image: "img/textures/fence.png", repeat_x: 10 } }
],
show(style, allStyle, graphicType) {
return style.outline && !style.diffHeight
}
},
{ {
name: "distanceDisplayCondition", name: "distanceDisplayCondition",
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论