Skip to content

Commit

Permalink
docs: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zouyaoji committed Jun 28, 2021
1 parent 77b9638 commit cdde5ec
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 9 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
## Changelog

### 3.0.1-beta.8
*2021-06-28*

#### New feature

- The polyline and polygon of vc-drawings, vc-measurements support the setting of display and hidden.
- The height of the coordinate measuring component supports absolute height and relative height.

#### Bug fixes

- The mouseover and mouseout events of the GeoJSON data source component trigger errors.
- The distance measurement and area measurement cancel the drawing of the previous point occasionally crash.

### 3.0.1-beta.7
*2021-06-13*

Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
## 更新日志

### 3.0.1-beta.8
*2021-06-13*

#### 新特性

- 绘制量算组件的面、线对象支持设置显隐。
- 坐标量算组件的高度支持绝对高度和相对高度。

#### Bug 修复

- GeoJSON 数据源组件 mouseover 和 mouseout 事件触发错误。
- 折线距离量算、面积量算取消绘制上一个点偶尔崩溃。


### 3.0.1-beta.7
*2021-06-13*

Expand Down
2 changes: 1 addition & 1 deletion website/docs/en-US/tools/vc-drawings.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Basic usage of drawing components.
| position | String | `'top-right'` | `optional` Specify the location of the drawing component. |top-right/top-left/bottom-right/bottom-left/top/right/bottom/left |
| offset | Array | `[0, 0]` | `optional` Specify the offset based on the position. |
| show | Boolean | `true` | `optional` Specify whether the drawn result is visible. |
| drawings | Array | `['point', 'polyline', 'polygon']` | `optional` Specify the drawing instance to be loaded. |
| drawings | Array | `['point', 'polyline', 'polygon', 'rectangle', 'circle']` | `optional` Specify the drawing instance to be loaded. |
| activeColor | String | `'positive'` | `optional` Specify the color when the drawing instance is activated. |
| editable | Boolean | `false` | `optional` Specify whether the drawing result can be edited. |
| clampToGround | Boolean | `false` | `optional` Specify whether the drawing result object is attached to the ground or 3dtiles. Only line and area objects work. |
Expand Down
3 changes: 2 additions & 1 deletion website/docs/en-US/tools/vc-measurements.md
Original file line number Diff line number Diff line change
Expand Up @@ -1552,7 +1552,8 @@ Tip: Each measurement button (FabAction) corresponds to the measurement paramete
lat: 6,
height: 2,
slope: 3
}
},
heightReference: 1 // 0 absolute 1 relative ground
}
```

Expand Down
2 changes: 1 addition & 1 deletion website/docs/zh-CN/tools/vc-drawings.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ ctrl + 右键取消绘制。
| position | String | `'top-right'` | `optional` 指定绘制组件的位置。 |top-right/top-left/bottom-right/bottom-left/top/right/bottom/left |
| offset | Array | `[0, 0]` | `optional` 指定绘制组件基于位置的偏移量。 |
| show | Boolean | `true` | `optional` 指定绘制的结果是否可见。 |
| drawings | Array | `['point', 'polyline', 'polygon']` | `optional` 指定要加载的绘制实例。 |
| drawings | Array | `['point', 'polyline', 'polygon', 'rectangle', 'circle']` | `optional` 指定要加载的绘制实例。 |
| activeColor | String | `'positive'` | `optional` 指定绘制实例激活时的颜色。 |
| editable | Boolean | `false` | `optional` 指定绘制结果对象是否可编辑。 |
| clampToGround | Boolean | `false` | `optional` 指定绘制结果对象是否贴地或模型。仅线、面对象生效。 |
Expand Down
16 changes: 10 additions & 6 deletions website/docs/zh-CN/tools/vc-measurements.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ ctrl + 右键取消绘制。
<vc-layer-imagery>
<vc-provider-imagery-tianditu mapStyle="img_c" :maximumLevel="17" token="436ce7e50d27eede2f2929307e6b33c0"></vc-provider-imagery-tianditu>
</vc-layer-imagery>
<vc-provider-terrain-cesium v-if="addTerrain"></vc-provider-terrain-cesium>
</vc-viewer>
<el-row class="demo-toolbar">
<el-button type="danger" round @click="unload">销毁</el-button>
<el-button type="danger" round @click="load">加载</el-button>
<el-button type="danger" round @click="reload">重载</el-button>
<el-checkbox v-model="editable">可编辑</el-checkbox>
<el-checkbox v-model="addTerrain">地形</el-checkbox>
</el-row>
</el-row>

Expand All @@ -91,6 +93,7 @@ ctrl + 右键取消绘制。
export default {
data() {
return {
addTerrain: false,
editable: false,
measurementFabOptions1: {
direction: 'right'
Expand Down Expand Up @@ -155,11 +158,11 @@ ctrl + 右键取消绘制。
this.$refs.measurementsRef4.toggleAction(measurementOpts)
},
onTilesetReady(tileset, viewer) {
const cartographic = Cesium.Cartographic.fromCartesian(tileset.boundingSphere.center)
const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height)
const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 5)
const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3())
tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation)
// const cartographic = Cesium.Cartographic.fromCartesian(tileset.boundingSphere.center)
// const surface = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height)
// const offset = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, 5)
// const translation = Cesium.Cartesian3.subtract(offset, surface, new Cesium.Cartesian3())
// tileset.modelMatrix = Cesium.Matrix4.fromTranslation(translation)
viewer.zoomTo(tileset)
viewer.scene.globe.depthTestAgainstTerrain = true
},
Expand Down Expand Up @@ -1552,7 +1555,8 @@ ctrl + 右键取消绘制。
lat: 6,
height: 2,
slope: 3
}
},
heightReference: 1 // 0 是绝对高度 1 是相对地面高度
}
```

Expand Down

0 comments on commit cdde5ec

Please sign in to comment.