Commit f7a50b44 by wanghao

v3.3.10

parent af570879
......@@ -44,7 +44,7 @@
"geocoder": false,
"selectionIndicator": false,
"defaultContextMenu": true,
"contextmenu": { "hasDefault": true },
"mouseDownView": true,
"zoom": { "insertIndex": 1 },
"compass": { "bottom": "toolbar", "left": "5px" },
......
......@@ -2,7 +2,7 @@
* Mars3D三维可视化平台 mars3d
*
* 版本信息:v3.3.9
* 编译日期:2022-05-22 14:42:11
* 编译日期:2022-05-23 10:15:38
* 版权所有:Copyright by 火星科技 http://mars3d.cn
* 使用单位:免费公开版 ,2022-02-01
*/
......
......@@ -3,7 +3,7 @@
* Mars3D三维可视化平台 mars3d
*
* 版本信息:v3.3.9
* 编译日期:2022-05-22 14:42:10
* 编译日期:2022-05-23 10:15:38
* 版权所有:Copyright by 火星科技 http://mars3d.cn
* 使用单位:免费公开版 ,2022-02-01
*/
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.
......@@ -5,7 +5,9 @@ function UIComponent() {
return (
<>
<MarsPannel visible={true} right={10} top={10} height="45">
<MarsCheckbox onChange={(e) => mapWork.chkUnderground(e.target.checked)}>是否动态</MarsCheckbox>
<MarsCheckbox onChange={(e) => mapWork.chkUnderground(e.target.checked)} defaultChecked={true}>
是否动态
</MarsCheckbox>
</MarsPannel>
<div style={{ position: "absolute", bottom: "40px", right: "20px" }}>
<img style={{ height: "200px" }} src="/img/legend/heatmap.png" alt="" />
......
......@@ -19,7 +19,7 @@ function initMap() {
fxaa: true
},
control: {
defaultContextMenu: true // 右键菜单
contextmenu: { hasDefault: true } // 右键菜单
}
})
......
......@@ -30,7 +30,7 @@ function initMap() {
sceneModePicker: true, // 二三维切换按钮
navigationHelpButton: true, // 帮助按钮
fullscreenButton: true, // 全屏按钮
defaultContextMenu: true // 右键菜单
contextmenu: { hasDefault: true } // 右键菜单
},
terrain: {
url: "//data.mars3d.cn/terrain",
......
import { Component } from "react"
import * as mapWork from "./map.js"
import axios from "axios"
import { Space } from "antd"
import {
MarsInput,
......@@ -21,7 +22,8 @@ import {
$alert,
$notify,
$showLoading,
$hideLoading
$hideLoading,
MarsTable
} from "@mars/components/MarsUI"
class UIComponent extends Component<any, any> {
......@@ -29,10 +31,12 @@ class UIComponent extends Component<any, any> {
super(props)
this.state = {
visible: true,
inputValue: 5
inputValue: 5,
typhoonList: []
}
mapWork.eventTarget.on("init", ({ value }) => {
this.setInputValue(value)
this.getTyphoonList()
})
}
......@@ -50,6 +54,48 @@ class UIComponent extends Component<any, any> {
}))
}
columns = [
{
title: "台风编号",
dataIndex: "typnumber",
key: "typnumber"
},
{
title: "台风名(中文)",
dataIndex: "name_cn"
},
{
title: "台风名(英文)",
dataIndex: "name_en"
}
]
getTyphoonList() {
const url = "//data.mars3d.cn/file/apidemo/typhoon/list_2020.json"
axios.get(url).then((res: any) => {
const data = res.data
const resultData = data.typhoonList.map((item: any) => ({
key: item[0],
id: item[0],
name_en: item[1],
name_cn: item[2],
typnumber: item[3],
state: item[7]
}))
this.setState((prevState) => ({
...prevState,
typhoonList: resultData
}))
})
}
rowSelection = {
hideSelectAll: true,
hideDefaultSelections: true,
onChange: (selectedRowKeys: string[]) => {}
}
render() {
return (
<>
......@@ -88,6 +134,15 @@ class UIComponent extends Component<any, any> {
<MarsInputGroup value={["1", "2", "3"]} units={[",", ",", "."]} onChange={(v) => console.log(v)}></MarsInputGroup>
</MarsFormItem>
</MarsForm>
<MarsTable
size="small"
dataSource={this.state.typhoonList}
columns={this.columns}
bordered
pagination={{ pageSize: 5 }}
rowSelection={this.rowSelection}
></MarsTable>
<Space wrap>
<MarsButton onClick={() => $message("message提示信息")}>
<MarsIcon icon="aiming"></MarsIcon>
......
......@@ -54,7 +54,3 @@ export function butAddTxtName(name) {
export function flytoView(center) {
map.setCameraView(center)
}
export function removeLocalStorage() {
localStorage.removeItem("bookmark")
}
......@@ -12,7 +12,7 @@ function initMap() {
sceneModePicker: true, // 二三维切换按钮
navigationHelpButton: true, // 帮助按钮
fullscreenButton: true, // 全屏按钮
defaultContextMenu: true // 右键菜单
contextmenu: { hasDefault: true } // 右键菜单
},
basemaps: [
{
......
......@@ -22,7 +22,7 @@ function initMap() {
timeline: true, // 时间线
// 以下是mars3d.control定义的控件
defaultContextMenu: true, // 右键菜单
contextmenu: { hasDefault: true }, // 右键菜单
mouseDownView: true,
compass: { top: "10px", left: "5px" },
distanceLegend: { left: "100px", bottom: "2px" }
......
......@@ -58,7 +58,7 @@ function UIComponent() {
<MarsButton onClick={onClickDistance}>distance</MarsButton>
<MarsButton onClick={onClickHeight}>height</MarsButton>
<MarsButton onClick={onClickArea}>area</MarsButton>
<MarsButton onClick={onClickAngle}>ditance</MarsButton>{" "}
<MarsButton onClick={onClickAngle}>angle</MarsButton>{" "}
</Col>
</Row>
</div>
......
......@@ -19,7 +19,7 @@ export const mapOptions = {
clockAnimate: true, // 时钟动画控制(左下角)
timeline: true, // 是否显示时间线控件
defaultContextMenu: true, // 涉及到多语言的模块:右键菜单
contextmenu: { hasDefault: true }, // 涉及到多语言的模块:右键菜单
compass: { top: "10px", left: "5px" },
distanceLegend: { left: "180px", bottom: "30px" },
locationBar: {
......
......@@ -13,7 +13,7 @@ function initMap() {
sceneModePicker: true, // 二三维切换按钮
navigationHelpButton: true, // 帮助按钮
fullscreenButton: true, // 全屏按钮
defaultContextMenu: true // 右键菜单
contextmenu: { hasDefault: true } // 右键菜单
},
basemaps: [
{
......
......@@ -21,7 +21,6 @@ export function onMounted(mapInstance) {
map = mapInstance // 记录map
addMeasure()
}
/**
* 释放当前地图业务的生命周期函数
* @returns {void} 无
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论