Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivWeb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivWeb
Commits
fc08153e
Commit
fc08153e
authored
Mar 21, 2022
by
邓晓峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 集成ARGGIS
parent
f432d5fc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
156 additions
and
115 deletions
+156
-115
package-lock.json
package-lock.json
+109
-15
index.js
src/components/mapView/index.js
+15
-0
BasicLayout1.js
src/layouts/BasicLayout1.js
+12
-3
index.js
src/pages/map/index.js
+20
-97
No files found.
package-lock.json
View file @
fc08153e
...
@@ -4,6 +4,11 @@
...
@@ -4,6 +4,11 @@
"lockfileVersion"
:
1
,
"lockfileVersion"
:
1
,
"requires"
:
true
,
"requires"
:
true
,
"dependencies"
:
{
"dependencies"
:
{
"@a11y/focus-trap"
:
{
"version"
:
"1.0.5"
,
"resolved"
:
"https://g.civnet.cn:4873/@a11y%2ffocus-trap/-/focus-trap-1.0.5.tgz"
,
"integrity"
:
"sha1-B0gYnDfKISVccCql3j7gDtSCHSI="
},
"@ahooksjs/use-request"
:
{
"@ahooksjs/use-request"
:
{
"version"
:
"2.8.13"
,
"version"
:
"2.8.13"
,
"resolved"
:
"https://g.civnet.cn:4873/@ahooksjs%2fuse-request/-/use-request-2.8.13.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/@ahooksjs%2fuse-request/-/use-request-2.8.13.tgz"
,
...
@@ -181,6 +186,21 @@
...
@@ -181,6 +186,21 @@
}
}
}
}
},
},
"@arcgis/core"
:
{
"version"
:
"4.22.2"
,
"resolved"
:
"https://g.civnet.cn:4873/@arcgis%2fcore/-/core-4.22.2.tgz"
,
"integrity"
:
"sha512-twx50yjKsMoeotgQfnYHmm4EIS57fC9rWNNrvGc2xERVUOY7p2fFPs2qemdyFnCmvrRNflZcnZkxrTZXeDCtow=="
,
"requires"
:
{
"@esri/arcgis-html-sanitizer"
:
"~2.9.0-next.1"
,
"@esri/calcite-colors"
:
"~6.0.1"
,
"@esri/calcite-components"
:
"1.0.0-beta.69"
,
"@popperjs/core"
:
"~2.10.2"
,
"focus-trap"
:
"~6.7.1"
,
"luxon"
:
"~2.1.1"
,
"moment"
:
"~2.29.1"
,
"sortablejs"
:
"~1.14.0"
}
},
"@babel/cli"
:
{
"@babel/cli"
:
{
"version"
:
"7.4.3"
,
"version"
:
"7.4.3"
,
"resolved"
:
"https://g.civnet.cn:4873/@babel%2fcli/-/cli-7.4.3.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/@babel%2fcli/-/cli-7.4.3.tgz"
,
...
@@ -2141,6 +2161,52 @@
...
@@ -2141,6 +2161,52 @@
}
}
}
}
},
},
"@esri/calcite-components"
:
{
"version"
:
"1.0.0-beta.69"
,
"resolved"
:
"https://g.civnet.cn:4873/@esri%2fcalcite-components/-/calcite-components-1.0.0-beta.69.tgz"
,
"integrity"
:
"sha1-SjGX1Thxp5byK0UUKO+o0kBGoVI="
,
"requires"
:
{
"@a11y/focus-trap"
:
"1.0.5"
,
"@popperjs/core"
:
"2.10.2"
,
"@stencil/core"
:
"2.10.0"
,
"@types/color"
:
"3.0.2"
,
"color"
:
"4.0.1"
,
"lodash-es"
:
"4.17.21"
,
"sortablejs"
:
"1.14.0"
},
"dependencies"
:
{
"@types/color"
:
{
"version"
:
"3.0.2"
,
"resolved"
:
"https://g.civnet.cn:4873/@types%2fcolor/-/color-3.0.2.tgz"
,
"integrity"
:
"sha1-N3kEPngvViqpFXtfxr0H4U/Y5/M="
,
"requires"
:
{
"@types/color-convert"
:
"*"
}
},
"color"
:
{
"version"
:
"4.0.1"
,
"resolved"
:
"https://g.civnet.cn:4873/color/-/color-4.0.1.tgz"
,
"integrity"
:
"sha1-Id9EzRAkWpGxzPW6AxYJsOEOfWc="
,
"requires"
:
{
"color-convert"
:
"^2.0.1"
,
"color-string"
:
"^1.6.0"
}
},
"color-convert"
:
{
"version"
:
"2.0.1"
,
"resolved"
:
"https://g.civnet.cn:4873/color-convert/-/color-convert-2.0.1.tgz"
,
"integrity"
:
"sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="
,
"requires"
:
{
"color-name"
:
"~1.1.4"
}
},
"color-name"
:
{
"version"
:
"1.1.4"
,
"resolved"
:
"https://g.civnet.cn:4873/color-name/-/color-name-1.1.4.tgz"
,
"integrity"
:
"sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
}
}
},
"@exodus/schemasafe"
:
{
"@exodus/schemasafe"
:
{
"version"
:
"1.0.0-rc.6"
,
"version"
:
"1.0.0-rc.6"
,
"resolved"
:
"https://g.civnet.cn:4873/@exodus%2fschemasafe/-/schemasafe-1.0.0-rc.6.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/@exodus%2fschemasafe/-/schemasafe-1.0.0-rc.6.tgz"
,
...
@@ -2536,6 +2602,11 @@
...
@@ -2536,6 +2602,11 @@
}
}
}
}
},
},
"@popperjs/core"
:
{
"version"
:
"2.10.2"
,
"resolved"
:
"https://g.civnet.cn:4873/@popperjs%2fcore/-/core-2.10.2.tgz"
,
"integrity"
:
"sha1-B5jAM1Hw3qGlpMq93yalWny+5ZA="
},
"@qixian.cs/path-to-regexp"
:
{
"@qixian.cs/path-to-regexp"
:
{
"version"
:
"6.1.0"
,
"version"
:
"6.1.0"
,
"resolved"
:
"https://g.civnet.cn:4873/@qixian.cs%2fpath-to-regexp/-/path-to-regexp-6.1.0.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/@qixian.cs%2fpath-to-regexp/-/path-to-regexp-6.1.0.tgz"
,
...
@@ -2619,6 +2690,11 @@
...
@@ -2619,6 +2690,11 @@
"integrity"
:
"sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ=="
,
"integrity"
:
"sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ=="
,
"dev"
:
true
"dev"
:
true
},
},
"@stencil/core"
:
{
"version"
:
"2.10.0"
,
"resolved"
:
"https://g.civnet.cn:4873/@stencil%2fcore/-/core-2.10.0.tgz"
,
"integrity"
:
"sha1-rPRLmuZXiiDw0Jv5QpboM76tyIU="
},
"@stylelint/postcss-css-in-js"
:
{
"@stylelint/postcss-css-in-js"
:
{
"version"
:
"0.37.2"
,
"version"
:
"0.37.2"
,
"resolved"
:
"https://g.civnet.cn:4873/@stylelint%2fpostcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/@stylelint%2fpostcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz"
,
...
@@ -4542,7 +4618,6 @@
...
@@ -4542,7 +4618,6 @@
"version"
:
"2.0.0"
,
"version"
:
"2.0.0"
,
"resolved"
:
"https://g.civnet.cn:4873/@types%2fcolor-convert/-/color-convert-2.0.0.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/@types%2fcolor-convert/-/color-convert-2.0.0.tgz"
,
"integrity"
:
"sha1-j17muehj3L7lcD9aUX/7E9PqTiI="
,
"integrity"
:
"sha1-j17muehj3L7lcD9aUX/7E9PqTiI="
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"@types/color-name"
:
"*"
"@types/color-name"
:
"*"
}
}
...
@@ -4550,8 +4625,7 @@
...
@@ -4550,8 +4625,7 @@
"@types/color-name"
:
{
"@types/color-name"
:
{
"version"
:
"1.1.1"
,
"version"
:
"1.1.1"
,
"resolved"
:
"https://g.civnet.cn:4873/@types%2fcolor-name/-/color-name-1.1.1.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/@types%2fcolor-name/-/color-name-1.1.1.tgz"
,
"integrity"
:
"sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
,
"integrity"
:
"sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
"dev"
:
true
},
},
"@types/compression"
:
{
"@types/compression"
:
{
"version"
:
"1.7.0"
,
"version"
:
"1.7.0"
,
...
@@ -7548,10 +7622,11 @@
...
@@ -7548,10 +7622,11 @@
}
}
},
},
"@wisdom-map/arcgismap"
:
{
"@wisdom-map/arcgismap"
:
{
"version"
:
"1.0.
60
-0"
,
"version"
:
"1.0.
75
-0"
,
"resolved"
:
"https://g.civnet.cn:4873/@wisdom-map%2farcgismap/-/arcgismap-1.0.
60
-0.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/@wisdom-map%2farcgismap/-/arcgismap-1.0.
75
-0.tgz"
,
"integrity"
:
"sha512-
My2JGb2y/xUwW0xMd/IL4xpdjK1BdN8X8GOSAMtR1yVLGXXXQhyyoY0okqALCxSGoxLa+VRYodKhtomPrCKML
Q=="
,
"integrity"
:
"sha512-
er5AxKI6zbaHTkvoDDs5I4uwtBElCkdeybdO7ZqkQnHNuKVvl250QYZy54wBNwPE1c2jQbbW/xEDZIKeuIRPg
Q=="
,
"requires"
:
{
"requires"
:
{
"@arcgis/core"
:
"^4.22.2"
,
"@babel/polyfill"
:
"7.4.3"
,
"@babel/polyfill"
:
"7.4.3"
,
"@babel/runtime"
:
"^7.12.0"
,
"@babel/runtime"
:
"^7.12.0"
,
"@wisdom-map/util"
:
"^1.0.28-0"
,
"@wisdom-map/util"
:
"^1.0.28-0"
,
...
@@ -7559,9 +7634,9 @@
...
@@ -7559,9 +7634,9 @@
},
},
"dependencies"
:
{
"dependencies"
:
{
"@wisdom-map/util"
:
{
"@wisdom-map/util"
:
{
"version"
:
"1.0.28-
0
"
,
"version"
:
"1.0.28-
7
"
,
"resolved"
:
"https://g.civnet.cn:4873/@wisdom-map%2futil/-/util-1.0.28-
0
.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/@wisdom-map%2futil/-/util-1.0.28-
7
.tgz"
,
"integrity"
:
"sha512-
jKRmiYu3SuDmYjCojaZP8UFr4LQR40MLcp1AEfir4lSLiNNLtdA83wTt60J1ZOkWKRBbJXgUpuQB1yoU7dIqcg
=="
"integrity"
:
"sha512-
tVqklwqtaJkXTNttNCvU5qCZCbOoRa0PSfBcXVMwpkp106KSdE8BBfr/VE5p3ndacGAr5YqY3UJCCZDgnPXs2w
=="
},
},
"react"
:
{
"react"
:
{
"version"
:
"16.14.0"
,
"version"
:
"16.14.0"
,
...
@@ -10085,14 +10160,12 @@
...
@@ -10085,14 +10160,12 @@
"color-name"
:
{
"color-name"
:
{
"version"
:
"1.1.3"
,
"version"
:
"1.1.3"
,
"resolved"
:
"https://g.civnet.cn:4873/color-name/-/color-name-1.1.3.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/color-name/-/color-name-1.1.3.tgz"
,
"integrity"
:
"sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
,
"integrity"
:
"sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
"dev"
:
true
},
},
"color-string"
:
{
"color-string"
:
{
"version"
:
"1.6.0"
,
"version"
:
"1.6.0"
,
"resolved"
:
"https://g.civnet.cn:4873/color-string/-/color-string-1.6.0.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/color-string/-/color-string-1.6.0.tgz"
,
"integrity"
:
"sha1-w5FfYf4mdnLLfh4GTJ1pIhn2wxI="
,
"integrity"
:
"sha1-w5FfYf4mdnLLfh4GTJ1pIhn2wxI="
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"color-name"
:
"^1.0.0"
,
"color-name"
:
"^1.0.0"
,
"simple-swizzle"
:
"^0.2.2"
"simple-swizzle"
:
"^0.2.2"
...
@@ -14029,6 +14102,14 @@
...
@@ -14029,6 +14102,14 @@
"integrity"
:
"sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc="
,
"integrity"
:
"sha1-UhTXU3pNBqSjAcDMJi/rhBiAAuc="
,
"dev"
:
true
"dev"
:
true
},
},
"focus-trap"
:
{
"version"
:
"6.7.3"
,
"resolved"
:
"https://g.civnet.cn:4873/focus-trap/-/focus-trap-6.7.3.tgz"
,
"integrity"
:
"sha512-8xCEKndV4KrseGhFKKKmczVA14yx1/hnmFICPOjcFjToxCJYj/NHH43tPc3YE/PLnLRNZoFug0EcWkGQde/miQ=="
,
"requires"
:
{
"tabbable"
:
"^5.2.1"
}
},
"follow-redirects"
:
{
"follow-redirects"
:
{
"version"
:
"1.14.4"
,
"version"
:
"1.14.4"
,
"resolved"
:
"https://g.civnet.cn:4873/follow-redirects/-/follow-redirects-1.14.4.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/follow-redirects/-/follow-redirects-1.14.4.tgz"
,
...
@@ -19135,6 +19216,11 @@
...
@@ -19135,6 +19216,11 @@
"es5-ext"
:
"~0.10.2"
"es5-ext"
:
"~0.10.2"
}
}
},
},
"luxon"
:
{
"version"
:
"2.1.1"
,
"resolved"
:
"https://g.civnet.cn:4873/luxon/-/luxon-2.1.1.tgz"
,
"integrity"
:
"sha1-NAUvejOnmJdnY3vnz4C0fbJk/4g="
},
"make-dir"
:
{
"make-dir"
:
{
"version"
:
"2.1.0"
,
"version"
:
"2.1.0"
,
"resolved"
:
"https://g.civnet.cn:4873/make-dir/-/make-dir-2.1.0.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/make-dir/-/make-dir-2.1.0.tgz"
,
...
@@ -27081,7 +27167,6 @@
...
@@ -27081,7 +27167,6 @@
"version"
:
"0.2.2"
,
"version"
:
"0.2.2"
,
"resolved"
:
"https://g.civnet.cn:4873/simple-swizzle/-/simple-swizzle-0.2.2.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/simple-swizzle/-/simple-swizzle-0.2.2.tgz"
,
"integrity"
:
"sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo="
,
"integrity"
:
"sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo="
,
"dev"
:
true
,
"requires"
:
{
"requires"
:
{
"is-arrayish"
:
"^0.3.1"
"is-arrayish"
:
"^0.3.1"
},
},
...
@@ -27089,8 +27174,7 @@
...
@@ -27089,8 +27174,7 @@
"is-arrayish"
:
{
"is-arrayish"
:
{
"version"
:
"0.3.2"
,
"version"
:
"0.3.2"
,
"resolved"
:
"https://g.civnet.cn:4873/is-arrayish/-/is-arrayish-0.3.2.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/is-arrayish/-/is-arrayish-0.3.2.tgz"
,
"integrity"
:
"sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
,
"integrity"
:
"sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
"dev"
:
true
}
}
}
}
},
},
...
@@ -27289,6 +27373,11 @@
...
@@ -27289,6 +27373,11 @@
}
}
}
}
},
},
"sortablejs"
:
{
"version"
:
"1.14.0"
,
"resolved"
:
"https://g.civnet.cn:4873/sortablejs/-/sortablejs-1.14.0.tgz"
,
"integrity"
:
"sha1-bS4XzL2yX0ZHNN9iHU811Ks1s9g="
},
"source-list-map"
:
{
"source-list-map"
:
{
"version"
:
"2.0.1"
,
"version"
:
"2.0.1"
,
"resolved"
:
"https://g.civnet.cn:4873/source-list-map/-/source-list-map-2.0.1.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/source-list-map/-/source-list-map-2.0.1.tgz"
,
...
@@ -29029,6 +29118,11 @@
...
@@ -29029,6 +29118,11 @@
"@babel/runtime"
:
"^7.10.2"
"@babel/runtime"
:
"^7.10.2"
}
}
},
},
"tabbable"
:
{
"version"
:
"5.2.1"
,
"resolved"
:
"https://g.civnet.cn:4873/tabbable/-/tabbable-5.2.1.tgz"
,
"integrity"
:
"sha1-4/2nNn3bsXLc2p+HHA/bNtHEzZw="
},
"table"
:
{
"table"
:
{
"version"
:
"5.4.6"
,
"version"
:
"5.4.6"
,
"resolved"
:
"https://g.civnet.cn:4873/table/-/table-5.4.6.tgz"
,
"resolved"
:
"https://g.civnet.cn:4873/table/-/table-5.4.6.tgz"
,
src/components/mapView/index.js
0 → 100644
View file @
fc08153e
// eslint-disable-next-line import/extensions
// import arcgisConfig from '@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core/config';
import
React
from
'react'
;
// eslint-disable-next-line import/extensions
import
{
ArcGISMap
as
MapComponent
}
from
'@wisdom-map/arcgismap'
;
// import MapComponent from './lib/index.js';
// eslint-disable-next-line react/prefer-stateless-function
export
default
class
ArcGISMap
extends
React
.
Component
{
render
()
{
// arcgisConfig.assetsPath = `${window.location.origin
// }/${pkg.name.toLocaleLowerCase()}/assets`;
return
<
MapComponent
{...
this
.
props
}
/>
;
}
}
src/layouts/BasicLayout1.js
View file @
fc08153e
...
@@ -669,10 +669,14 @@ const BasicLayout = props => {
...
@@ -669,10 +669,14 @@ const BasicLayout = props => {
}
}
{
{
window
.
location
.
pathname
.
startsWith
(
'/civbase/civ_3d'
)
?
<
KeepAlive
><
CesiumMap
/><
/KeepAlive> : !window.location.pathname.startsWith
(
'/
civbase
/
civweb4
') ? <CreateBaseMap options={{ type: '
ArcgisMap
' }} /> : null
window
.
location
.
pathname
.
startsWith
(
'/civbase/civ_3d'
)
?
<
KeepAlive
><
CesiumMap
/><
/KeepAlive> : nul
l
}
{
window
.
location
.
pathname
.
startsWith
(
'/civbase/civ_webgis'
)
?
<
CreateBaseMap
/>
:
null
}
}
<
div
id
=
"micro-container"
className
=
"subapp-container"
>
<
div
id
=
"micro-container"
className
=
"subapp-container"
>
{/*
<CreateBaseMap/>
*/}
{
/*
<CreateBaseMap/>
*/
}
{
props
.
children
}
{
props
.
children
}
<
/div
>
<
/div
>
{
props
.
children
}
{
props
.
children
}
...
@@ -688,7 +692,12 @@ const BasicLayout = props => {
...
@@ -688,7 +692,12 @@ const BasicLayout = props => {
}
}
{
{
window.location.pathname.startsWith('
/
civbase
/
civ_3d
') ? <KeepAlive><CesiumMap /></KeepAlive> : !window.location.pathname.startsWith('
/
civbase
/
civweb4
') ? <CreateBaseMap options={{ type: '
ArcgisMap
' }} /> : null
window
.
location
.
pathname
.
startsWith
(
'/civbase/civ_3d'
)
?
<
KeepAlive
><
CesiumMap
/><
/KeepAlive> : nul
l
}
{
window
.
location
.
pathname
.
startsWith
(
'/civbase/civ_webgis'
)
?
<
CreateBaseMap
/>
:
null
}
}
<
div
id
=
"micro-container"
className
=
"subapp-container"
>
<
div
id
=
"micro-container"
className
=
"subapp-container"
>
{
/*<CreateBaseMap/>*/
}
{
/*<CreateBaseMap/>*/
}
...
...
src/pages/map/index.js
View file @
fc08153e
/* eslint-disable */
import
React
from
'react'
;
import
React
from
'react'
;
import
{
Spin
}
from
'antd'
;
import
{
connect
}
from
'react-redux'
;
import
{
connect
}
from
'react-redux'
;
import
{
actionCreators
}
from
'@/containers/App/store'
;
import
{
actionCreators
}
from
'@/containers/App/store'
;
import
_
from
'lodash'
;
import
MapComponent
from
'@/components/mapView'
;
// import { AMapScene } from '@wisdom-map/Amap';
import
{
ArcGISMap
}
from
'@wisdom-map/arcgismap'
;
// import arcgisConfig from '@wisdom-map/arcgismap/lib/arcgisapi/4.20/@arcgis/core/config';
// import pkg from '../../../package.json';
// arcgisConfig.assetsPath = `${window.location.origin}/${pkg.name.toLocaleLowerCase()}/assets`;
// window.arcgisAssetsPath = arcgisConfig.assetsPath;
class
Map
extends
React
.
PureComponent
{
constructor
(
props
)
{
super
(
props
);
this
.
options
=
_
.
merge
({},
props
.
options
);
this
.
state
=
{
type
:
props
.
options
.
type
,
loading
:
true
,
options
:
this
.
transformMapsetting
(
window
.
globalConfig
.
mapsettings
),
widgets
:
window
.
globalConfig
.
uiwidgets
,
}
}
transformMapsetting
(
mapsettings
)
{
let
layers
=
mapsettings
.
layers
;
layers
=
layers
.
map
(
item
=>
{
item
.
url
=
/^
\/
/
.
test
(
item
.
url
)
?
`/
${
item
.
url
}
`
:
item
.
url
;
return
item
;
})
return
Object
.
assign
({},
mapsettings
,
{
layers
:
layers
});
}
destroyAMap
()
{
// import style from './baseMapPage.less';
// const mapKey = [
// '_AMap_AMap.MapType',
// '_AMap_labelcanvas',
// '_AMap_imagelayer',
// '_AMap_anole',
// '_AMap_AMap.Scale',
// '_AMap_rbush',
// '_AMap_AMap.IndoorMap',
// '_AMap_AMap.CustomLayer',
// '_AMap_AMap.MarkerClusterer',
// '_AMap_vectorlayer',
// '_AMap_AMap.OverView',
// '_AMap_sync',
// '_AMap_AMap.PlaceSearch',
// '_AMap_AMap.DistrictSearch',
// '_AMap_Map3D',
// '_AMap_AMap.Autocomplete',
// '_AMap_AMap.Heatmap',
// '_AMap_wgl',
// '_AMap_overlay',
// '_AMap_cvector',
// '_AMap_AMap.ToolBar',
// '_AMap_mouse',
// '_AMap_AMap.RangingTool',
// '_AMap_data.tileKeys'
// ];
// // eslint-disable-next-line no-plusplus
// for (let i = 0; i < mapKey.length; i++) {
// localStorage.removeItem(mapKey[i]);
// }
// delete window.AMap;
// delete window.AMapUI;
// delete window.AMapUI_DEBUG;
}
componentWillMount
()
{
// this.destroyAMap()
}
getAMap
(
AMapObj
,
AMap
)
{
// this.props.updageMapView({
// AMapObj,
// AMap
// });
}
getArcGISMap
(
map
)
{
this
.
props
.
updageMapView
(
map
);
}
show
()
{
}
hide
()
{
class
CreateMap
extends
React
.
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
mapManganerRef
=
React
.
createRef
();
}
}
destroy
()
{
state
=
{
loading
:
true
,
config
:
window
.
globalConfig
.
mapsettings
,
widgets
:
window
.
globalConfig
.
uiwidgets
,
};
}
getView
=
view
=>
{
this
.
props
.
updageMapView
(
view
);
};
render
()
{
render
()
{
return
(
return
(
<>
<>
{
<
MapComponent
{...
this
.
state
}
getMapInfo
=
{
this
.
getView
}
/
>
this
.
state
.
type
===
'AMap'
?
(
<
div
{...
this
.
state
}
getMapInfo
=
{
this
.
getAMap
.
bind
(
this
)}
/
>
)
:
(
<
ArcGISMap
config
=
{
this
.
state
.
options
}
getMapInfo
=
{
this
.
getArcGISMap
.
bind
(
this
)}
/
>
)
}
<
/
>
<
/
>
)
)
;
}
}
}
}
const
mapStateToProps
=
state
=>
({});
const
mapStateToProps
=
state
=>
({});
const
mapDispatchToProps
=
dispatch
=>
({
const
mapDispatchToProps
=
dispatch
=>
({
...
@@ -120,4 +43,4 @@ const mapDispatchToProps = dispatch => ({
...
@@ -120,4 +43,4 @@ const mapDispatchToProps = dispatch => ({
export
default
connect
(
export
default
connect
(
mapStateToProps
,
mapStateToProps
,
mapDispatchToProps
,
mapDispatchToProps
,
)(
Map
);
)(
Create
Map
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment