绘制图层的图形全部都在geojson图层之下会被覆盖,同步graphic类型使用说明

news2024/9/26 1:22:39
### 绘制图层

```js
const graphicLayer = new mars3d.layer.GraphicLayer({
    zIndex: 1000000000000000000000000,
    hasEdit: false,
    isAutoEditing: false, // 绘制完成后是否自动激活编辑
    // addHeight: 1,
    allowDrillPick: false,
})
```

绘制方法

```js
graphicLayer
    .startDraw({
        type: type,
        style: {
            color: window.graphic.fullcolor || props.color,
            opacity: props.opacity || 0.4,
            outlineColor: window.graphic.linecolor || props.outlineColor,
            clampToGround: true,
            zIndex: 100000,
            // height: 1,
            // heightReference: Cesium.RELATIVE_TO_GROUND,
            fill: true, // 是否填充,仅面数据有效。
            fillColor: window.graphic.fullcolor || 'rgba(192,192,192,0.2)',
            font_size: 25,
            outline: true, // 是否显示边,仅面数据有效
            outlineWidth: window.graphic.linewidth || 4,
            horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
            verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
            visibleDepth: true,
        },
    })
    .then((graphic) => {
        if (!active.value) {
            graphicLayer.clear()
            return
        }
        if (isContinue) {
            graphicLayer.clear()
            graphicLayer.addGraphic(graphic)
        }
        const gra = graphic.toGeoJSON()
        let graphicValue = graphic.toGeoJSON()
        if (active.value === 'circle') {
            var center = [gra.geometry.coordinates[0], gra.geometry.coordinates[1]]
            var radius = gra.properties.style.radius / 1000
            var options = { steps: 32, units: 'kilometers', properties: { foo: 'bar' } }
            var circle = turf.circle(center, radius, options)
            graphicValue = circle
        } else if (active.value === 'rectangle') {
            graphicValue.geometry.coordinates = [
                graphic._outlinePositions.map((d) => {
                    const c = worldToLonlat(marsMap.map.viewer, d)
                    return [c.lon, c.lat]
                }),
            ]
            graphicValue.geometry.type = 'Polygon'
        } else if (active.value === 'polygon') {
            graphicValue.geometry.coordinates[0] = graphicValue.geometry.coordinates[0].map((d) => {
                return [d[0], d[1]]
            })
            graphicValue.geometry.coordinates[0] = [
                ...graphicValue.geometry.coordinates[0],
                graphicValue.geometry.coordinates[0][0],
            ]
        }
        if (props.useValue === 'wkt') {
            graphicValue = convertToWK(graphicValue)
        }
        useEmit(graphicValue)
        useChange(false)
        if (type === 'point') {
            draw(type, true)
        }
    })
```

### 加载geojson图层

```js
let _layer = new mars3d.layer.GeoJsonLayer({
    domId,
    id,
    data: {
        type: 'FeatureCollection',
        features: features
    },
    zIndex,
    symbol: {
        verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
        scale: 1,
        styleOptions: {
            // opacity:transparent ? 0 : (target.transparency ? parseFloat(target.transparency) : 1.0),
            // outline:transparent ? false : true,
            // outlineStyle: {
            //     opacity:transparent ? 0 : (target.transparency ? parseFloat(target.transparency) : 1.0),
            //     color: target.borderColor || '#0d3685',
            //     width:  target.borderWidth ? parseFloat(target.borderWidth) : 1.0,
            // },
            // point: {
            //     clampToGround: true
            // },
            // clampToGround: true,
            // // classification: true,
            // materialOptions: {
            //     width: 20,
            //     height: 20,
            // },
            // image: undefined,
            // color:  transparent ? 'transparent' : (target.featureType === 'point' ? undefined : (target.color || '#E3170D')) ,
            // fullColor: transparent ? 'transparent' : (target.color || '#E3170D'),
            // // color: '#E3170D',
            // // fullColor: '#E3170D',
            // verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
            // scale: 1,
            // scaleByDistance: true,
            // scaleByDistance_far: 20000,
            // scaleByDistance_farValue: 0.5,
            // scaleByDistance_near: 1000,
            // scaleByDistance_nearValue: 1,
            color,
            // opacity: 0.4,
            outlineColor: borderColor,
            clampToGround: true,
            fill: true,
            fillColor: color,
            font_size: 25,
            outline: true,
            outlineWidth: borderWidth,
            horizontalOrigin: 0,
            verticalOrigin: 1,
            visibleDepth: true,
        },
        callback: function (attr, styleOpt) {
            const { img, opacity } = geoStyle
            styleOpt.id = id,
            opacity && (styleOpt.opacity = opacity),
            styleOpt.width = target.imageWidth ? parseFloat(target.imageWidth) : 3
            styleOpt.height = target.imageWidth ? parseFloat(target.imageWidth) : 3
            styleOpt.image = img instanceof Function ? img(attr) : img
            if (!styleOpt.image && defaultImage) {
                styleOpt.image = defaultImage
            }
            return styleOpt
        }
    },
    // center: { lat: 31.928659, lng: 120.420654, alt: 838, heading: 344, pitch: -42 },
    flyTo,
    flyToOptions
})

问题描述:

绘制GraphicLayer图层的graphic图形全部都在geojson图层之下,会被覆盖


问题的原因以及解决方案:

 1.GraphicLayer的graphic的type
与GeoJsonLayer的symbol的type   指定的类型要一样,都是Entity或者都是Primitive类型,并且要加上clampToGround+zIndex共同实现控制层级覆盖等效果

2.GraphicLayer和GeoJsonLayer的graphic的type不一致的时候,需要不同的高度值实现层级控制功能,GraphicLayer在startDraw的时候,支持updateDrawPosition更新绘制坐标。

3.updateDrawPosition绘制的时候更新绘制坐标的用法,参考mars3d官网示例。

链接:

http://mars3d.cn/editor-vue.html?key=ex_7_14_0&id=layer-graphic/draw/draw

 const graphic = await graphicLayer.startDraw({
    type: "polyline",
    style: {
      color: clampToGround ? "#ffff00" : "#3388ff",
      width: 3,
      clampToGround
    },
    // 绘制时,外部自定义更新坐标,可以自定义处理特殊业务返回修改后的新坐标。
    updateDrawPosition: function (position, graphic) {
      if (keyDownCode === 67) {
        // 按下C键 ,限定在纬度线上
        position = updateDrawPosition(position, graphic.lastDrawPoint, 1)
      } else if (keyDownCode === 86) {
        // 按下V键 ,限定在经度线上
        position = updateDrawPosition(position, graphic.lastDrawPoint, 2)
      }
      return position
    }
    // 外部自定义校验坐标,return false 时坐标无效,不参与绘制
    // validDrawPosition: function (position, graphic) {
    //   const point = mars3d.LngLatPoint.fromCartesian(position)
    //   return (point.lng > 115 && point.lng < 117)
    // }
  })
  console.log("完成了draw标绘", graphic)



补充说明:

1.测试过程中发现【geojsonLayer graphicLayer】两个图层之间的矢量对象zIndex失效

2.问题说明:

【zIndex 层级控制】graphicLayer1.startDraw({绘制的矢量层级zIndex失效

GeoJsonLayer的层级是9,graphicLayer的层级是999,且都是贴地的

但是绘制的矩形依然无法遮挡GeoJsonLayer

相关代码:

export function showDraw(isFlyTo) {
  removeLayer()

  graphicLayer = new mars3d.layer.GeoJsonLayer({
    zIndex:9,
    name: "标绘示例数据",
      data: {
          "type": "FeatureCollection",
          "layer": {
              "id": "M-C91E06B6-AF6F-4DB3-8237-1F036F8F89C9",
              "name": ""
          },
          "features": [
              {
                  "type": "Feature",
                  "properties": {
                      "name": "面",
                      "type": "polygon",
                      "group": "平面",
                      "id": "M-CBBFF5D5-AD8E-4116-B2DA-D0510E04D89E",
                      "styleType": "polygon",
                      "style": {
                          "materialType": "Checkerboard",
                          "repeat": 10,
                          "color": "#96b825",
                          "fill": true,
                          "oddcolor": "#ffffff",
                          "opacity": 0.6,
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition_far": 100000,
                          "clampToGround": false,
                          "diffHeight": 0,
                          "lineCount": 8,
                          "lineThickness": 2,
                          "cellAlpha": 0.1,
                          "evenColor": "#0079fa",
                          "oddColor": "#ffffff",
                          "stRotationDegree": 0,
                          "outline": false,
                          "distanceDisplayCondition": false,
                          "distanceDisplayCondition_near": 0,
                          "hasShadows": false,
                          "zIndex": 0
                      }
                  },
                  "geometry": {
                      "type": "Polygon",
                      "coordinates": [
                          [
                              [
                                  116.283799,
                                  30.913481,
                                  563.3
                              ],
                              [
                                  116.298598,
                                  30.916559,
                                  403.9
                              ],
                              [
                                  116.309554,
                                  30.906019,
                                  366.3
                              ],
                              [
                                  116.304475,
                                  30.899226,
                                  382.9
                              ],
                              [
                                  116.29394,
                                  30.894739,
                                  390.5
                              ],
                              [
                                  116.280348,
                                  30.904161,
                                  427.2
                              ],
                              [
                                  116.283799,
                                  30.913481,
                                  563.3
                              ],
                              [
                                  116.283799,
                                  30.913481,
                                  563.3
                              ],
                              [
                                  116.283799,
                                  30.913481,
                                  563.3
                              ],
                              [
                                  116.283799,
                                  30.913481,
                                  563.3
                              ],
                              [
                                  116.283799,
                                  30.913481,
                                  563.3
                              ]
                          ]
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "name": "矩形",
                      "type": "rectangle",
                      "group": "平面",
                      "id": "M-216307B9-7608-40C8-9B5A-7825C1158631",
                      "style": {
                          "height": 585.7,
                          "materialType": "Grid",
                          "cellAlpha": 0.42,
                          "color": "#33ffc5",
                          "fill": true,
                          "lineCount": 6,
                          "lineThickness": 2,
                          "opacity": 0.6,
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition_far": 100000,
                          "clampToGround": false,
                          "diffHeight": 0,
                          "evenColor": "#000000",
                          "oddColor": "#ffffff",
                          "repeat": 2,
                          "outline": false,
                          "rotationDegree": 0,
                          "stRotationDegree": 0,
                          "distanceDisplayCondition": false,
                          "distanceDisplayCondition_near": 0,
                          "hasShadows": false,
                          "zIndex": 0
                      }
                  },
                  "geometry": {
                      "type": "LineString",
                      "coordinates": [
                          [
                              116.242439,
                              30.898129,
                              585.7
                          ],
                          [
                              116.268751,
                              30.913517,
                              585.7
                          ]
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "name": "圆",
                      "type": "circle",
                      "group": "平面",
                      "id": "M-25E68089-ADE4-405D-8067-C4A8DB968017",
                      "style": {
                          "height": 657.6,
                          "materialType": "Stripe",
                          "repeat": 10,
                          "radius": 1255.92,
                          "fill": true,
                          "color": "#3388ff",
                          "opacity": 0.6,
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition_far": 100000,
                          "clampToGround": false,
                          "diffHeight": 0,
                          "speed": 10,
                          "count": 1,
                          "gradient": 0.1,
                          "lineCount": 8,
                          "lineThickness": 2,
                          "cellAlpha": 0.1,
                          "evenColor": "#0036bd",
                          "oddColor": "#ffffff",
                          "stRotationDegree": 0,
                          "outline": false,
                          "rotationDegree": 0,
                          "distanceDisplayCondition": false,
                          "distanceDisplayCondition_near": 0,
                          "hasShadows": false,
                          "zIndex": 0
                      }
                  },
                  "geometry": {
                      "type": "Point",
                      "coordinates": [
                          116.214796,
                          30.907629,
                          657.6
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "name": "椭圆",
                      "type": "ellipse",
                      "group": "平面",
                      "id": "M-38574A25-923E-4607-9F5A-7675031B9A10",
                      "style": {
                          "height": 619.1,
                          "materialType": "Checkerboard",
                          "semiMinorAxis": 858.07,
                          "semiMajorAxis": 1418.01,
                          "fill": true,
                          "oddcolor": "#ffffff",
                          "repeat": 8,
                          "color": "#3388ff",
                          "opacity": 0.6,
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition_far": 100000,
                          "clampToGround": false,
                          "diffHeight": 0,
                          "speed": 10,
                          "count": 1,
                          "gradient": 0.1,
                          "lineCount": 8,
                          "lineThickness": 2,
                          "cellAlpha": 0.1,
                          "evenColor": "#18857c",
                          "oddColor": "#ffffff",
                          "stRotationDegree": 0,
                          "outline": false,
                          "rotationDegree": 0,
                          "distanceDisplayCondition": false,
                          "distanceDisplayCondition_near": 0,
                          "hasShadows": false,
                          "zIndex": 0
                      }
                  },
                  "geometry": {
                      "type": "Point",
                      "coordinates": [
                          116.411659,
                          30.903628,
                          619.1
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "type": "circle",
                      "group": "平面",
                      "id": "M-B227B6BD-6F0B-4856-9E75-7BB183020070",
                      "name": "",
                      "style": {
                          "materialType": "CircleWave",
                          "count": 2,
                          "height": 743.4,
                          "radius": 1800,
                          "fill": true,
                          "speed": 10,
                          "gradient": 0.1,
                          "color": "#3388ff",
                          "opacity": 0.6,
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition_far": 100000,
                          "clampToGround": false
                      }
                  },
                  "geometry": {
                      "type": "Point",
                      "coordinates": [
                          116.284302,
                          30.837405,
                          743.4
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "name": "圆形图片",
                      "type": "circle",
                      "group": "平面",
                      "id": "M-A90F2FC2-5A1E-472A-A99C-D920AD1601A6",
                      "style": {
                          "materialType": "Image",
                          "image": "/img/tietu/leida.jpg",
                          "opacity": 0.8,
                          "height": 472.1,
                          "radius": 1442.92,
                          "fill": true,
                          "color": "#3388ff",
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition_far": 100000,
                          "clampToGround": false
                      }
                  },
                  "geometry": {
                      "type": "Point",
                      "coordinates": [
                          116.172567,
                          30.90894,
                          472.1
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "name": "多边形图片",
                      "type": "polygon",
                      "group": "平面",
                      "id": "M-D6FF4810-D798-49FF-BF99-D342896D9221",
                      "styleType": "polygon",
                      "style": {
                          "materialType": "Image",
                          "image": "/img/textures/poly-soil.jpg",
                          "opacity": 1,
                          "fill": true,
                          "color": "#3388ff",
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition_far": 100000,
                          "clampToGround": false
                      }
                  },
                  "geometry": {
                      "type": "Polygon",
                      "coordinates": [
                          [
                              [
                                  116.355381,
                                  30.905217,
                                  545
                              ],
                              [
                                  116.374256,
                                  30.893151,
                                  550.3
                              ],
                              [
                                  116.386675,
                                  30.911064,
                                  556.4
                              ],
                              [
                                  116.36443,
                                  30.914996,
                                  540.9
                              ],
                              [
                                  116.355381,
                                  30.905217,
                                  545
                              ],
                              [
                                  116.355381,
                                  30.905217,
                                  545
                              ],
                              [
                                  116.355381,
                                  30.905217,
                                  545
                              ],
                              [
                                  116.355381,
                                  30.905217,
                                  545
                              ],
                              [
                                  116.355381,
                                  30.905217,
                                  545
                              ]
                          ]
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "name": "贴地矩形图片",
                      "type": "rectangle",
                      "group": "平面",
                      "id": "M-83DB5DA2-73A8-438B-AACA-0449606B485A",
                      "style": {
                          "image": "/img/tietu/gugong.jpg",
                          "materialType": "Image",
                          "fill": true,
                          "color": "#3388ff",
                          "opacity": 0.6,
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition_far": 100000,
                          "height": 0,
                          "clampToGround": false
                      }
                  },
                  "geometry": {
                      "type": "LineString",
                      "coordinates": [
                          [
                              116.321299,
                              30.894268,
                              0
                          ],
                          [
                              116.346701,
                              30.915492,
                              0
                          ]
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "name": "集结地",
                      "type": "gatheringPlace",
                      "styleType": "polygon",
                      "group": "平面",
                      "id": "M-9330ED0D-4EA5-4B8E-9B9B-BE7B66990BF8",
                      "style": {
                          "color": "#00ad8a",
                          "diffHeight": 0,
                          "fill": true,
                          "lineCount": 8,
                          "lineThickness": 2,
                          "cellAlpha": 0.1,
                          "evenColor": "#000000",
                          "oddColor": "#ffffff",
                          "repeat": 2,
                          "opacity": 0.69,
                          "stRotationDegree": 0,
                          "outline": false,
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition": false,
                          "distanceDisplayCondition_far": 100000,
                          "distanceDisplayCondition_near": 0,
                          "hasShadows": false,
                          "zIndex": 0,
                          "clampToGround": false,
                          "materialType": "Color"
                      }
                  },
                  "geometry": {
                      "type": "Polygon",
                      "coordinates": [
                          [
                              [
                                  116.397607,
                                  30.766435,
                                  662
                              ],
                              [
                                  116.438842,
                                  30.779146,
                                  665.2
                              ],
                              [
                                  116.427509,
                                  30.818898,
                                  503
                              ]
                          ]
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "name": "燕尾直箭头",
                      "type": "fineArrowYW",
                      "styleType": "polygon",
                      "group": "平面",
                      "id": "M-DE4DD8E3-E719-443C-9FF1-475B7BD9D290",
                      "style": {
                          "color": "#fff200",
                          "diffHeight": 0,
                          "fill": true,
                          "lineCount": 8,
                          "lineThickness": 2,
                          "cellAlpha": 0.1,
                          "evenColor": "#000000",
                          "oddColor": "#ffffff",
                          "repeat": 2,
                          "opacity": 0.54,
                          "stRotationDegree": 0,
                          "outline": false,
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition": false,
                          "distanceDisplayCondition_far": 100000,
                          "distanceDisplayCondition_near": 0,
                          "hasShadows": false,
                          "zIndex": 0,
                          "clampToGround": false,
                          "materialType": "Color"
                      }
                  },
                  "geometry": {
                      "type": "Polygon",
                      "coordinates": [
                          [
                              [
                                  116.335922,
                                  30.678001,
                                  328.2
                              ],
                              [
                                  116.372386,
                                  30.786478,
                                  419.2
                              ]
                          ]
                      ]
                  }
              },
              {
                  "type": "Feature",
                  "properties": {
                      "name": "钳击箭头",
                      "type": "doubleArrow",
                      "styleType": "polygon",
                      "group": "平面",
                      "id": "M-4492C7B1-F860-4F4B-A30D-3863A83F99C5",
                      "style": {
                          "color": "#ff0900",
                          "diffHeight": 0,
                          "fill": true,
                          "lineCount": 8,
                          "lineThickness": 2,
                          "cellAlpha": 0.1,
                          "evenColor": "#000000",
                          "oddColor": "#ffffff",
                          "repeat": 2,
                          "opacity": 0.56,
                          "stRotationDegree": 0,
                          "outline": false,
                          "outlineWidth": 1,
                          "outlineColor": "#ffffff",
                          "outlineOpacity": 0.6,
                          "distanceDisplayCondition": false,
                          "distanceDisplayCondition_far": 100000,
                          "distanceDisplayCondition_near": 0,
                          "hasShadows": false,
                          "zIndex": 0,
                          "clampToGround": false,
                          "materialType": "Color"
                      }
                  },
                  "geometry": {
                      "type": "Polygon",
                      "coordinates": [
                          [
                              [
                                  116.14095,
                                  30.758996,
                                  542.8
                              ],
                              [
                                  116.237801,
                                  30.716212,
                                  194.7
                              ],
                              [
                                  116.279206,
                                  30.787596,
                                  658.2
                              ],
                              [
                                  116.242369,
                                  30.798216,
                                  488.6
                              ]
                          ]
                      ]
                  }
              }
          ]
      },
    popup: "{type} {name}",
    queryParameters: {
      token: "mars3d" // 可以传自定义url参数,如token等
    },
    symbol: {
      merge: true,
      styleOptions: {
          clampToGround: true,
        // 高亮时的样式
        highlight: {
          type: "click",
          opacity: 0.9
        }
      }
    },
    flyTo: isFlyTo
  })
  map.addLayer(graphicLayer)

  // load事件,必须在load完成前绑定才能监听
  graphicLayer.on(mars3d.EventType.load, function (event) {
    if (event.layer) {
      console.log("数据加载完成", event)
    }
  })

  setTimeout(() => {
    // readyPromise是可以load加载数据完成后去获取
    graphicLayer.readyPromise.then(function (layer) {
      console.log("readyPromise:数据加载完成", layer)
    })
  }, 5000)

  // 单击事件
  graphicLayer.on(mars3d.EventType.click, function (event) {
    console.log("单击了图层", event)
  })
  const   graphicLayer1 = new mars3d.layer.GraphicLayer(
    {
          zIndex:999,
          popup: "zIndex矩形999最大应该在上面",
    }
  )
    map.addLayer(graphicLayer1)
    setTimeout(() => {
        alert("zIndex矩形应该在上面,无法单击集结地")
        graphicLayer1.startDraw({
            type: "rectangle",
            style: {
                clampToGround:true,
                color: "#ffff00",
                opacity: 0.6,
                outline: true,
                outlineWidth: 3,
                outlineColor: "#ffffff",
                label: {
                    text: "我是火星科技",
                    font_size: 18,
                    color: "#ffffff",
                    distanceDisplayCondition: true,
                    distanceDisplayCondition_far: 500000,
                    distanceDisplayCondition_near: 0
                }
            }
        })


    }, 500)
}

 

此时不知道该如何初始化这个代码,使得同类型(entity/primitive)graphic+贴地的矢量数据的层级zIndex生效

排查思路:

1.看下打印后的矢量对象就知道未贴地,

2. 问题原因:

geojsonLayty在初始化配置了merge: true合并样式后就以数据里面的样式为主;

因此导致参数不生效,依然为false。

        clampToGround:true,

3.此时的姐姐方案:

可以使用onCreateGraphic 方法去创建对象,具体方法参考示例,

    //自定义创建对象,可替代BusineDataLayer、GraphicLayer、GeojsonLayer里面的symbol

    onCreateGraphic: function (e) {
      const graphic = new mars3d.graphic.BillboardEntity({
        position: e.position,
        style: {
          image: "img/marker/lace-blue.png",
          width: 25,
          height: 34, // 聚合必须有width、height
          horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
          verticalOrigin: Cesium.VerticalOrigin.BOTTOM
        },
        attr: e.attr
      })
      graphicLayer.addGraphic(graphic)
    },

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1975650.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

一款免费的Windows 11/10系统常见问题修复工具

FixWin是一款功能强大的Windows系统修复工具&#xff0c;免费便携&#xff0c;无需安装即可使用。FixWin旨在帮助用户解决各种常见的Windows问题。它提供了多种修复选项和故障排除功能&#xff0c;适用于 Windows 11/10。 FixWin 主要功能&#xff1a; 系统文件检查器&#x…

深⼊理解指针(3)

1. 字符指针变量 2. 数组指针变量 3. ⼆维数组传参的本质 4. 函数指针变量 5. 函数指针数组 6. 转移表 1. 字符指针变量 在指针的类型中我们知道有⼀种指针类型为字符指针 ⼀般使⽤: char* 这两种方式都是把字符串中的首字符的地址赋值给pc。 在这串代码中 str1内容的地…

JVM高级特性

JVM高级特性 内存管理 jvm是自动内存管理的 运行时数据区域 Java虚拟机在执行Java程序的过程中会把它所管理的内存划分为若干个不同的数据区域。这些区域 有各自的用途&#xff0c;以及创建和销毁的时间&#xff0c;有的区域随着虚拟机进程的启动而一直存在&#xff0c;有些…

基于STM32的智能仓储管理系统教程

目录 引言环境准备智能仓储管理系统基础代码实现&#xff1a;实现智能仓储管理系统 物品识别与追踪模块环境监控模块数据处理与存储模块用户界面与远程管理应用场景&#xff1a;仓储管理与优化常见问题与解决方案收尾与总结 引言 随着电子商务和物流行业的快速发展&#xff…

C++手撕简易vector

提前准备工作 由于vector跟string不同&#xff0c;vector是可以存储不同类型的变量的容器&#xff0c;因此实现类模板是肯定的 在原本的STL的vector容器中&#xff0c;主要成员变量有&#xff0c;start&#xff0c;finish&#xff0c;和 end_of_storage 所以 template<cl…

leetcode 2415.反转二叉树的奇数层

1.题目要求: 给你一棵 完美 二叉树的根节点 root &#xff0c;请你反转这棵树中每个 奇数 层的节点值。例如&#xff0c;假设第 3 层的节点值是 [2,1,3,4,7,11,29,18] &#xff0c;那么反转后它应该变成 [18,29,11,7,4,3,1,2] 。 反转后&#xff0c;返回树的根节点。完美 二叉…

SolverLearner:提升大模型在高度归纳推理的复杂任务性能,使其能够在较少的人为干预下自主学习和适应

SolverLearner&#xff1a;提升大模型在高度归纳推理的复杂任务性能&#xff0c;使其能够在较少的人为干预下自主学习和适应 提出背景归纳推理&#xff08;Inductive Reasoning&#xff09;演绎推理&#xff08;Deductive Reasoning&#xff09;反事实推理&#xff08;Counterf…

npm ERR! missing script: serve

报错原因&#xff1a;我这里是因为跑错命令了&#xff0c;我用的npm run serve 解决办法&#xff1a;去package.json文件里面找到对应的serve命令运行即可&#xff0c;每个系统都不太一样&#xff0c;如果还不行可以看看是不是项目终端搞错了&#xff0c;比如我这个项目有两个前…

行为型设计模式3:模板方法/备忘录/解释器/迭代器

设计模式&#xff1a;模板方法/备忘录/解释器/迭代器 (qq.com)

无需提示的思考链推理:深度探索大型语言模型的内在能力

人工智能咨询培训老师叶梓 转载标明出处 在人工智能领域&#xff0c;提升大模型&#xff08;LLMs&#xff09;的推理能力一直是研究的重点。传统的方法主要依赖于特定的提示技术&#xff0c;例如少量样本或零样本的思考链&#xff08;CoT&#xff09;提示。这些方法虽然有效&am…

力扣爆刷第169天之TOP200五连刷111-115(课程表、单词搜索、归并)

力扣爆刷第169天之TOP200五连刷111-115&#xff08;课程表、单词搜索、归并&#xff09; 文章目录 力扣爆刷第169天之TOP200五连刷111-115&#xff08;课程表、单词搜索、归并&#xff09;一、207. 课程表二、LCR 125. 图书整理 II三、402. 移掉 K 位数字四、79. 单词搜索五、9…

Python自动化办公2.0:重塑工作效率的未来

在现代办公环境中&#xff0c;自动化技术和数据分析已经成为提升工作效率和决策质量的关键。随着Python编程语言的发展&#xff0c;我们迎来了“Python自动化办公2.0”时代&#xff0c;这一时代不仅包括强大的数据分析工具&#xff0c;还涵盖了酷炫的可视化技术和前沿的机器学习…

【卷积神经网络】卷积层详解【数学+python代码】

1、简介 学习目标&#xff1a; 掌握卷积计算过程掌握特征图大小计算方法掌握PyTorch卷积层API 基本概念&#xff1a; ①在计算机视觉领域&#xff0c;往往我们输入的图像都很大&#xff0c;使用全连接网络的话&#xff0c;计算的代价较高。 另外图像也很 难保留原有的特征 &am…

科技赋能生活——便携气象站

传统气象站往往庞大而复杂&#xff0c;需要专业人员维护&#xff0c;它小巧玲珑&#xff0c;设计精致&#xff0c;可以轻松放入背包或口袋&#xff0c;随身携带&#xff0c;不占空间。无论是城市白领穿梭于高楼大厦间&#xff0c;还是户外爱好者深入山林湖海&#xff0c;都能随…

numpy如何按等长分割数组

numpy如何按等长分割数组 1、效果 2、流程 1、分割数组 2、转列表3、代码 # -*- coding: utf-8 -*-""" @contact: 微---信 1257309054 @file: test.py @time: 2024/8/03 19:46 @author: LDC """ import numpy as np# 假设arr是需要分割的nump…

virtualbox7安装centos7.9配置静态ip

1.背景 我大概在一年之前安装virtualbox7centos7.9的环境&#xff0c;但看视频说用vagrant启动的窗口可以不用第三方工具(比如xshell、secure等)连接centos7.9&#xff0c;于是尝鲜试了下还可以&#xff0c;导致系统文件格式是vmdk了&#xff08;网上有vmdk转vdi的方法&#xf…

ChatGLM3-6B模型部署微调实战

准备 教程 视频教程 https://www.bilibili.com/video/BV1ce411J7nZ?p14&vd_source165c419c549bc8d0c2d71be2d7b93ccc 视频对应的资料 https://pan.baidu.com/wap/init?surlAjPi7naUMcI3OGG9lDpnpQ&pwdvai2#/home/%2FB%E7%AB%99%E5%85%AC%E5%BC%80%E8%AF%BE%E3%8…

Keil5.40因为Jlink驱动闪退问题

现象 Cannot load driver ‘C:\Keil_v5\ARM\Segger\JL2CM3.dll 原因 由于Jlink为盗版&#xff0c;导致闪退。 具体为JLinkARM.dll这个插件搞鬼。 这个插件的来源为 也就是我们装Jlink驱动的时候&#xff0c;勾选了这个选项&#xff0c;而导致这个毒瘤插件进入Keil&#xff…

代码题-01_顺序表_基础知识

线性表 线性表&#xff08;list&#xff09;:零个或多个相同数据元素的有限序列 线性表是逻辑结构&#xff08;元素之间一对一相邻关系&#xff09;按存储方式分为 顺序表链表 顺序表 顺序表的定义 静态分配&#xff08;使用数组存数据&#xff09; 有溢出风险 typedef…

特定领域软件架构-系统架构师(三十七)

软件架构复用 有三个阶段&#xff1a; 首先构造/获取可复用的软件资产其次管理这些资产&#xff08;构件库&#xff09;最后针对这些需求&#xff0c;从这些资产中选择可复用的部分&#xff0c;满足需求应用系统。 特定领域软件架构 DSSA&#xff08;Domain Specific softwa…