Browse Source

载入 olMap

dev
巴林闲侠 2 years ago
parent
commit
4c0b70db57
  1. 76588
      web/client/assets/js/OlMap/OlMapTool.common.js
  2. 1
      web/client/assets/js/OlMap/OlMapTool.common.js.map
  3. 1
      web/client/assets/js/OlMap/OlMapTool.css
  4. 115
      web/client/assets/js/OlMap/OlMapTool.umd.min.js
  5. 1
      web/client/assets/js/OlMap/OlMapTool.umd.min.js.map
  6. 43
      web/client/index.ejs
  7. 4
      web/client/index.html
  8. 66
      web/client/src/sections/quanju/containers/example.js
  9. 73
      web/client/src/sections/quanju/containers/public/olMap.js

76588
web/client/assets/js/OlMap/OlMapTool.common.js

File diff suppressed because one or more lines are too long

1
web/client/assets/js/OlMap/OlMapTool.common.js.map

File diff suppressed because one or more lines are too long

1
web/client/assets/js/OlMap/OlMapTool.css

@ -0,0 +1 @@
.ol-tooltip{position:relative;background:rgba(0,0,0,.6);border-radius:4px;color:#fff;padding:4px 8px;opacity:.7;white-space:nowrap;font-size:12px}.ol-tooltip-measure{opacity:1;font-weight:700}.ol-tooltip-static{background-color:#fc3;color:#000;border:1px solid #fff}.ol-tooltip-measure:before,.ol-tooltip-static:before{border-top:6px solid rgba(0,0,0,.5);border-right:6px solid transparent;border-left:6px solid transparent;content:"";position:absolute;bottom:-6px;margin-left:-7px;left:50%}.ol-tooltip-static:before{border-top-color:#fc3}.ol-popup{position:absolute;filter:drop-shadow(0 1px 4px rgba(0,0,0,.2));padding:15px;border-radius:4px;transform:translate(10px,25px);min-width:200px;text-align:left;background-color:hsla(0,0%,100%,.8)}.ol-popup:after,.ol-popup:before{top:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.ol-popup:after{border-width:10px;left:50%;margin-left:-10px}.ol-popup:before{border-width:11px;left:50%;margin-left:-11px}.ol-popup-closer{text-decoration:none;position:absolute;top:2px;right:8px}.ol-popup-closer:after{content:"x"}.ol-popup-content{font-size:14px}.ol-popup-content-tab td:nth-child(odd){font-weight:700}.contextmenu{position:absolute;padding:3px;width:100px;font-size:12px;border-radius:3px;cursor:pointer;text-align:left}.contextmenu ul li{padding:10px}.contextmenu ul li:last-child{border-bottom:none}.contextmenu ul li span{margin-left:5px}

115
web/client/assets/js/OlMap/OlMapTool.umd.min.js

File diff suppressed because one or more lines are too long

1
web/client/assets/js/OlMap/OlMapTool.umd.min.js.map

File diff suppressed because one or more lines are too long

43
web/client/index.ejs

@ -1,24 +1,26 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head>
<head>
<meta charset="UTF-8" /> <meta charset="UTF-8" />
<link rel="shortcut icon" href="/assets/images/favicon.ico" /> <link rel="shortcut icon" href="/assets/images/favicon.ico" />
<link rel="stylesheet" href="/assets/fontziti/font.css" /> <link rel="stylesheet" href="/assets/fontziti/font.css" />
<link <link rel="stylesheet" type="text/css" href="/assets/font_sc/iconfont.css" />
rel="stylesheet" <!-- -->
type="text/css" <script src="/assets/js/OlMap/OlMapTool.umd.min.js"></script>
href="/assets/font_sc/iconfont.css" <link rel="stylesheet" href="/assets/js/OlMap/OlMapTool.css">
/> <!-- -->
<script type="text/javascript"> <script type="text/javascript">
window._AMapSecurityConfig = { window._AMapSecurityConfig = {
securityJsCode: 'e955cd5ddfc3a752aa27d1e1c67d182d', securityJsCode: 'e955cd5ddfc3a752aa27d1e1c67d182d',
} }
</script> </script>
<script src="https://webapi.amap.com/maps?v=2.0&key=00f9a29dedcdbd8befec3dfe0cef5003&plugin=AMap.Adaptor,AMap.Scale,AMap.ToolBar,AMap.DistrictSearch,AMap.Geocoder,AMap.CustomLayer,Map3D,ElasticMarker"></script> <script
<script src="https://webapi.amap.com/loca?v=2.0.0&key=00f9a29dedcdbd8befec3dfe0cef5003"></script> src="https://webapi.amap.com/maps?v=2.0&key=00f9a29dedcdbd8befec3dfe0cef5003&plugin=AMap.Adaptor,AMap.Scale,AMap.ToolBar,AMap.DistrictSearch,AMap.Geocoder,AMap.CustomLayer,Map3D,ElasticMarker"></script>
</head> <script src="https://webapi.amap.com/loca?v=2.0.0&key=00f9a29dedcdbd8befec3dfe0cef5003"></script>
</head>
<body style="background: transparent"> <body style="background: transparent">
<!-- <link <!-- <link
rel="stylesheet/less" rel="stylesheet/less"
type="text/css" type="text/css"
@ -27,12 +29,13 @@
/> --> /> -->
<script> <script>
window.less = { window.less = {
async: false, async: false,
env: "production", env: "production",
}; };
</script> </script>
<script type="text/javascript" src="/assets/js/less/less.min.js"></script> <script type="text/javascript" src="/assets/js/less/less.min.js"></script>
<div id="App"></div> <div id="App"></div>
</body> </body>
</html>
</html>

4
web/client/index.html

@ -7,6 +7,10 @@
<link rel="shortcut icon" href="/assets/images/favicon.ico" /> <link rel="shortcut icon" href="/assets/images/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/assets/font_sc/iconfont.css" /> <link rel="stylesheet" type="text/css" href="/assets/font_sc/iconfont.css" />
<link rel="stylesheet" href="/assets/fontziti/font.css" /> <link rel="stylesheet" href="/assets/fontziti/font.css" />
<!-- -->
<script src="/assets/js/OlMap/OlMapTool.umd.min.js"></script>
<link rel="stylesheet" href="/assets/js/OlMap/OlMapTool.css">
<!-- -->
<script type="text/javascript"> <script type="text/javascript">
window._AMapSecurityConfig = { window._AMapSecurityConfig = {
securityJsCode: 'e955cd5ddfc3a752aa27d1e1c67d182d', securityJsCode: 'e955cd5ddfc3a752aa27d1e1c67d182d',

66
web/client/src/sections/quanju/containers/example.js

@ -7,49 +7,49 @@ import Header from './heand';
import Footer from './footer'; import Footer from './footer';
import ProTable, { TableDropdown } from '@ant-design/pro-table'; import ProTable, { TableDropdown } from '@ant-design/pro-table';
import Gis from './footer/gis/gis'; import Gis from './footer/gis/gis';
import OlMap from './public/olMap'
const MAPID = 'screenGis' const MAPID = 'screenGis'
const Example = (props) => { const Example = (props) => {
const { dispatch, actions, user, loading } = props const { dispatch, actions, user, loading } = props
const [tabKey, setTabKey] = useState('leadership') const [tabKey, setTabKey] = useState('leadership')
const [mapObj, setMapObj] = useState(); const [mapObj, setMapObj] = useState();
const tabChange = (tab) => { const tabChange = (tab) => {
setTabKey(tab) setTabKey(tab)
// dispatch({ type: 'TAB-CHANGE', data: tab }) // dispatch({ type: 'TAB-CHANGE', data: tab })
} }
return (
<Spin tip="biubiubiu~" spinning={loading}>
return ( <div style={{
<Spin tip="biubiubiu~" spinning={loading}> backgroundColor: "#031839", width: "100vw", height: "100vh", /* transform: `scale(${Math.min(
<div style={{
backgroundColor: "#031839", width: "100vw", height: "100vh", /* transform: `scale(${Math.min(
document.body.clientWidth / 1920, document.body.clientWidth / 1920,
document.body.clientHeight / 1080 document.body.clientHeight / 1080
)})`, */ )})`, */
}}> }}>
<div style={{ width: "100%", height: "10%" }}> <div style={{ width: "100%", height: "10%" }}>
<Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} user={user} /> <Header tabChange={tabChange} tabKey={tabKey} dispatch={dispatch} user={user} />
</div> </div>
<div style={{ position: 'absolute', width: "100%", height: "90%" }}> <div style={{ position: 'absolute', width: "100%", height: "90%" }}>
{/* <Gis tabKey={tabKey} /> */} {/* <Gis tabKey={tabKey} /> */}
<Footer tabKey={tabKey} dispatch={dispatch} /> <OlMap />
<Footer tabKey={tabKey} dispatch={dispatch} />
</div>
</div> </div>
</div> </Spin>
</Spin> )
)
} }
function mapStateToProps(state) { function mapStateToProps (state) {
const { auth, global, members } = state; const { auth, global, members } = state;
return { return {
loading: members.isRequesting, loading: members.isRequesting,
user: auth.user, user: auth.user,
actions: global.actions, actions: global.actions,
members: members.data members: members.data
}; };
} }
export default connect(mapStateToProps)(Example); export default connect(mapStateToProps)(Example);

73
web/client/src/sections/quanju/containers/public/olMap.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save