Commit 4d75c339 authored by 田翔's avatar 田翔

fix: 改变地图引用模式

parent 49b382ad
{
"name": "panda-xform",
"version": "2.7.7",
"description": "2.7.7: 地图版本升级",
"version": "2.7.8",
"description": "2.7.8: 改变地图引用模式",
"keywords": [
"panda-xform"
],
......
......@@ -14,15 +14,16 @@ import Drag from '../../../components/Drag'
const Coordinate = (props) => {
const { token, client } = window.globalConfig
const { value, onChange, schema, addons } = props
const { disabled, placeholder, presetValue } = schema
const [coordinate, setCoordinate] = useState('')
// const [coordinate, setCoordinate] = useState('')
const [layersConifg, setLayersConifg] = useState(() => {
const mapConfig = window.globalConfig.mapsettings?.layers || null
return { layers: mapConfig };
});
const mapSettings = window.globalConfig?.mapsettings
const layers = window.globalConfig?.mapsettings?.layers
// const mapSettings = window.globalConfig?.mapsettings
// const layers = window.globalConfig?.mapsettings?.layers
const [loading, setLoading] = useState(false)
const [visible, setVisible] = useState(false)
const [currentPointer, setCurrentPointer] = useState([])
......@@ -162,7 +163,8 @@ const Coordinate = (props) => {
<ArcGISSceneMap
getMapInfo={getView}
widgets={[]}
config={layersConifg}
token={token}
client={client}
/>
{
view ? <div style={{ width: '400px', position: 'absolute', right: '0', top: '25px' }}>
......
......@@ -192,11 +192,12 @@ const initMapConfig = [
const Device = (props) => {
const mapConfig = window.globalConfig?.mapsettings?.layers || initMapConfig
// const mapConfig = window.globalConfig?.mapsettings?.layers || initMapConfig
const { token, client } = window.globalConfig
const { addons, value, onChange, schema } = props
const { placeholder, disabled, parent } = schema
const [visible, setVisible] = useState(false)
const layersConifg = { layers: mapConfig }
// const layersConifg = { layers: mapConfig }
let clickref = useRef(null)
let view = useRef(null)
......@@ -309,7 +310,8 @@ const Device = (props) => {
<ArcGISSceneMap
getMapInfo={getMapInfo}
widgets={[]}
config={layersConifg}
token={token}
client={client}
/>
</Drag>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment