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

fix: 改变地图引用模式

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