├── mock
└── .gitkeep
├── .env
├── .vscode
├── settings.json
└── launch.json
├── .eslintignore
├── src
├── components
│ ├── layout
│ │ ├── index.css
│ │ ├── README.md
│ │ ├── index.js
│ │ ├── ScrollContent.jsx
│ │ └── AccordionContent.jsx
│ ├── search
│ │ ├── Search.css
│ │ ├── routes
│ │ │ ├── DriveLineResult.css
│ │ │ ├── RideLineResult.css
│ │ │ ├── WalkLineResult.css
│ │ │ ├── BusyIndicator.css
│ │ │ ├── ErrorIndicator.css
│ │ │ ├── BusyIndicator.jsx
│ │ │ ├── index.js
│ │ │ ├── ErrorIndicator.jsx
│ │ │ ├── CircuitTypeSelector.css
│ │ │ ├── TerminalSelector.css
│ │ │ ├── RouteLocationSelector.jsx
│ │ │ └── RouteLocationSelector.css
│ │ ├── images
│ │ │ ├── fail.gif
│ │ │ ├── hotel.png
│ │ │ ├── icons.png
│ │ │ ├── other.png
│ │ │ ├── place.png
│ │ │ ├── timg.gif
│ │ │ ├── dining.png
│ │ │ ├── finance.png
│ │ │ ├── health.png
│ │ │ ├── icon_往返.png
│ │ │ ├── icon_终.png
│ │ │ ├── icon_起.png
│ │ │ ├── service.png
│ │ │ ├── carservice.png
│ │ │ ├── community.png
│ │ │ ├── education.png
│ │ │ ├── enterprise.png
│ │ │ ├── entertain.png
│ │ │ ├── icon_bus.png
│ │ │ ├── icon_walk.png
│ │ │ ├── shopping.png
│ │ │ ├── transport.png
│ │ │ ├── featurespot.png
│ │ │ ├── icon_subway.png
│ │ │ ├── organization.png
│ │ │ ├── icon_circle_red.png
│ │ │ ├── icon_circle_green.png
│ │ │ ├── publicfacilities.png
│ │ │ └── route-icon_2c25ce2.png
│ │ ├── support
│ │ │ ├── converters.js
│ │ │ └── conditions.js
│ │ ├── SearchResultCollapsePanel.css
│ │ ├── SearchResultList.css
│ │ ├── ClassificationQuery.jsx
│ │ ├── SearchResultDetail.css
│ │ ├── Search.jsx
│ │ └── GeoSearch.css
│ ├── sceneviewer
│ │ ├── Layerlist
│ │ │ ├── index.less
│ │ │ ├── images
│ │ │ │ ├── rzfx.png
│ │ │ │ ├── rzfx1.png
│ │ │ │ ├── layers1.png
│ │ │ │ └── layers2.png
│ │ │ ├── index.jsx
│ │ │ └── components
│ │ │ │ └── LightShadowPanle
│ │ │ │ └── index.less
│ │ ├── LightShadow
│ │ │ ├── index.less
│ │ │ ├── images
│ │ │ │ ├── rzfx.png
│ │ │ │ └── rzfx1.png
│ │ │ ├── index.jsx
│ │ │ └── components
│ │ │ │ └── LightShadowPanle
│ │ │ │ └── index.less
│ │ ├── BaseMap
│ │ │ ├── img
│ │ │ │ ├── btn.png
│ │ │ │ ├── dtqh.png
│ │ │ │ ├── dtqh1.png
│ │ │ │ ├── earth.png
│ │ │ │ ├── map.png
│ │ │ │ └── btn_selected.png
│ │ │ ├── basemapitem.jsx
│ │ │ └── Slider.less
│ │ ├── toolbar
│ │ │ ├── images
│ │ │ │ ├── 光照.jpg
│ │ │ │ ├── 导图.png
│ │ │ │ ├── 手指.png
│ │ │ │ ├── 旋转.png
│ │ │ │ ├── 移动.png
│ │ │ │ ├── 量面.png
│ │ │ │ ├── 量高.png
│ │ │ │ ├── 鱼眼.png
│ │ │ │ ├── 人视角.png
│ │ │ │ └── 天气特效.png
│ │ │ ├── ToolbarRight.css
│ │ │ ├── ToolbarRight.jsx
│ │ │ ├── ToolbarLeft.css
│ │ │ ├── Toolbar3D.less
│ │ │ └── ToolbarLeft.jsx
│ │ ├── Measure3Dbutton
│ │ │ ├── dwcj.png
│ │ │ ├── dwcj1.png
│ │ │ ├── images
│ │ │ │ ├── icon_measure1.png
│ │ │ │ └── icon_measure2.png
│ │ │ └── components
│ │ │ │ └── Slice3D.jsx
│ │ ├── ModifyDataSource
│ │ │ ├── images
│ │ │ │ ├── tjss.png
│ │ │ │ ├── tjss1.png
│ │ │ │ ├── icon_search1-01.png
│ │ │ │ └── icon_search2-01.png
│ │ │ ├── ModifyDataSourcePanle
│ │ │ │ └── component
│ │ │ │ │ └── dataItem
│ │ │ │ │ ├── img
│ │ │ │ │ └── data.png
│ │ │ │ │ ├── index.jsx
│ │ │ │ │ └── index.less
│ │ │ ├── index.css
│ │ │ └── index.jsx
│ │ ├── common
│ │ │ └── btnStyle.less
│ │ ├── compass
│ │ │ ├── index.css
│ │ │ └── index.jsx
│ │ ├── zoom
│ │ │ ├── index.css
│ │ │ └── index.jsx
│ │ └── home
│ │ │ ├── index.css
│ │ │ └── index.jsx
│ ├── mapcorrect
│ │ └── Mapcorrect.css
│ ├── plot
│ │ ├── index.js
│ │ ├── img
│ │ │ ├── defaultmap.png
│ │ │ └── polticon
│ │ │ │ ├── point.svg
│ │ │ │ ├── circle.svg
│ │ │ │ ├── font.svg
│ │ │ │ ├── icon-point.svg
│ │ │ │ ├── swallowtail_arrow.svg
│ │ │ │ ├── rectangle.svg
│ │ │ │ ├── general_arrow.svg
│ │ │ │ ├── polygon.svg
│ │ │ │ ├── double_arrow.svg
│ │ │ │ ├── clear.svg
│ │ │ │ └── polyline.svg
│ │ ├── geometryAttributeEditor
│ │ │ └── GeometryAttribute.less
│ │ ├── geometrySymbolEditor
│ │ │ ├── PointSymbolEditor.less
│ │ │ ├── TextSymbolEditor.less
│ │ │ ├── PolyGonSymbolEditor.less
│ │ │ ├── PolyLineSymbolEditor.less
│ │ │ └── index.js
│ │ └── poltpanel
│ │ │ └── PoltPanel.less
│ ├── layerTree
│ │ ├── index.js
│ │ ├── systemLayer
│ │ │ └── SystemLayer.less
│ │ └── layerList
│ │ │ └── LayerList.less
│ ├── toolbar
│ │ ├── images
│ │ │ ├── 尺.png
│ │ │ ├── 下载.png
│ │ │ └── 量宽.png
│ │ ├── ToolbarSplit.css
│ │ ├── Toolbar2D.css
│ │ └── ToolbarSplit.jsx
│ ├── popups
│ │ ├── images
│ │ │ ├── iw_bg.png
│ │ │ └── transparent.gif
│ │ ├── PoiPopup.jsx
│ │ └── Popup.css
│ ├── layerList
│ │ ├── img
│ │ │ ├── defaultmap.png
│ │ │ └── polticon
│ │ │ │ ├── point.svg
│ │ │ │ ├── circle.svg
│ │ │ │ ├── font.svg
│ │ │ │ ├── icon-point.svg
│ │ │ │ ├── swallowtail_arrow.svg
│ │ │ │ ├── rectangle.svg
│ │ │ │ ├── general_arrow.svg
│ │ │ │ ├── polygon.svg
│ │ │ │ ├── double_arrow.svg
│ │ │ │ ├── clear.svg
│ │ │ │ └── polyline.svg
│ │ ├── SystemSplitLayer.less
│ │ └── SplitLayerList.less
│ ├── mapviewer
│ │ ├── basemap
│ │ │ ├── img
│ │ │ │ └── map.png
│ │ │ ├── index.less
│ │ │ ├── basemapPanel
│ │ │ │ ├── index.less
│ │ │ │ └── index.jsx
│ │ │ └── index.jsx
│ │ ├── compass
│ │ │ ├── index.css
│ │ │ └── index.jsx
│ │ ├── zoom
│ │ │ ├── index.css
│ │ │ └── index.jsx
│ │ ├── viewInfo
│ │ │ ├── index.css
│ │ │ └── index.jsx
│ │ └── bookmark
│ │ │ └── index.css
│ ├── splitScreen
│ │ ├── index.css
│ │ └── index.jsx
│ ├── overviewmap
│ │ └── Overviewmap.css
│ ├── trans3d
│ │ ├── index.css
│ │ └── index.jsx
│ ├── widgets
│ │ ├── index.js
│ │ ├── Legend.jsx
│ │ ├── MeasureArea2D.jsx
│ │ ├── MeasureLine2D.jsx
│ │ └── PrintMap2D.jsx
│ ├── content
│ │ ├── index.css
│ │ └── ClosePanel.jsx
│ ├── measure2dbox
│ │ └── index.less
│ ├── rollerBlind
│ │ └── index.css
│ └── timesliderlayer
│ │ └── TimeSliderLayer.less
├── constants
│ ├── layerList.js
│ ├── app.js
│ ├── geomap-utils.js
│ └── layer-index.js
├── services
│ ├── example.js
│ ├── distinct.js
│ ├── portal4ags
│ │ ├── item
│ │ │ ├── totalWebScene.js
│ │ │ ├── totalSceneLayerItem.js
│ │ │ ├── itemInfo.js
│ │ │ ├── totalFeatureLayerItem.js
│ │ │ └── totalItem.js
│ │ ├── user
│ │ │ └── totalUser.js
│ │ ├── generateToken.js
│ │ └── group
│ │ │ └── totalGroup.js
│ ├── mapcorrectp.js
│ ├── tianditu
│ │ ├── busline.js
│ │ ├── driveline.js
│ │ └── searchpoi.js
│ ├── baiduAPI
│ │ ├── busline.js
│ │ ├── rideline.js
│ │ ├── walkline.js
│ │ ├── driveline.js
│ │ └── searchpoi.js
│ └── search.js
├── utils
│ ├── arcgis
│ │ ├── index.js
│ │ ├── remarks.js
│ │ ├── map
│ │ │ └── sceneviewUtil.js
│ │ └── layerTree
│ │ │ └── layertreeutils.js
│ ├── jsapi.js
│ ├── widgets.js
│ ├── common.js
│ ├── env.js
│ ├── envs.js
│ └── request.js
├── global.css
├── models
│ ├── toolbar.js
│ └── bookmark.js
├── middleware
│ └── arcgis
│ │ ├── mapview
│ │ └── arcgis-popup.js
│ │ └── sceneview
│ │ ├── arcgis-toolbar.js
│ │ ├── arcgis-weatherEffects.js
│ │ └── arcgis-sceneview.js
├── app.js
└── pages
│ ├── document.ejs
│ ├── sceneViewer
│ ├── index.js
│ └── index.css
│ └── index.css
├── public
├── images
│ ├── end.png
│ ├── start.png
│ ├── favicon.png
│ ├── basemap
│ │ ├── bmap.png
│ │ ├── tdtsl.png
│ │ └── tdtyy.png
│ └── busline
│ │ ├── end.png
│ │ ├── pin.png
│ │ ├── start.png
│ │ ├── pointSymbol.png
│ │ ├── svg_location_red.png
│ │ └── svg_location_highlight.png
├── libs
│ └── poltmodules
│ │ ├── CalculatePlot.js
│ │ ├── SwallowTailArrow.js
│ │ └── ToolTip.js
└── config
│ ├── poi.js
│ ├── classconfig.js
│ └── searchConfig.js
├── .prettierignore
├── .prettierrc
├── .eslintrc
├── .gitignore
├── .umirc.js
├── package.json
└── README.md
/mock/.gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.env:
--------------------------------------------------------------------------------
1 | BROWSER=none
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | }
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | public/config/*.js
--------------------------------------------------------------------------------
/src/components/layout/index.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/search/Search.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/search/routes/DriveLineResult.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/search/routes/RideLineResult.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/search/routes/WalkLineResult.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/layout/README.md:
--------------------------------------------------------------------------------
1 | # 这里定义左右面板中使用的最外层通用容器
--------------------------------------------------------------------------------
/src/constants/layerList.js:
--------------------------------------------------------------------------------
1 | export const LAYERLIST_SHOW = 'layerList-show';
2 |
3 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/Layerlist/index.less:
--------------------------------------------------------------------------------
1 | @import "../common/btnStyle.less";
2 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/LightShadow/index.less:
--------------------------------------------------------------------------------
1 | @import "../common/btnStyle.less";
2 |
--------------------------------------------------------------------------------
/public/images/end.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/end.png
--------------------------------------------------------------------------------
/public/images/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/start.png
--------------------------------------------------------------------------------
/src/components/mapcorrect/Mapcorrect.css:
--------------------------------------------------------------------------------
1 | .wrapClassName {
2 | pointer-events: none;
3 | }
4 |
--------------------------------------------------------------------------------
/public/images/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/favicon.png
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | **/*.md
2 | **/*.svg
3 | **/*.ejs
4 | **/*.html
5 | package.json
6 | .umi
7 | .umi-production
--------------------------------------------------------------------------------
/public/images/basemap/bmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/basemap/bmap.png
--------------------------------------------------------------------------------
/public/images/busline/end.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/busline/end.png
--------------------------------------------------------------------------------
/public/images/busline/pin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/busline/pin.png
--------------------------------------------------------------------------------
/src/components/plot/index.js:
--------------------------------------------------------------------------------
1 | import PoltPanel from './poltpanel/PoltPanel';
2 |
3 | export default PoltPanel;
--------------------------------------------------------------------------------
/public/images/basemap/tdtsl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/basemap/tdtsl.png
--------------------------------------------------------------------------------
/public/images/basemap/tdtyy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/basemap/tdtyy.png
--------------------------------------------------------------------------------
/public/images/busline/start.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/busline/start.png
--------------------------------------------------------------------------------
/src/components/layerTree/index.js:
--------------------------------------------------------------------------------
1 | import LayerList from './layerList/LayerList';
2 |
3 | export default LayerList;
--------------------------------------------------------------------------------
/src/components/toolbar/images/尺.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/toolbar/images/尺.png
--------------------------------------------------------------------------------
/public/images/busline/pointSymbol.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/busline/pointSymbol.png
--------------------------------------------------------------------------------
/src/components/plot/img/defaultmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/plot/img/defaultmap.png
--------------------------------------------------------------------------------
/src/components/popups/images/iw_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/popups/images/iw_bg.png
--------------------------------------------------------------------------------
/src/components/search/images/fail.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/fail.gif
--------------------------------------------------------------------------------
/src/components/search/images/hotel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/hotel.png
--------------------------------------------------------------------------------
/src/components/search/images/icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/icons.png
--------------------------------------------------------------------------------
/src/components/search/images/other.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/other.png
--------------------------------------------------------------------------------
/src/components/search/images/place.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/place.png
--------------------------------------------------------------------------------
/src/components/search/images/timg.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/timg.gif
--------------------------------------------------------------------------------
/src/components/toolbar/images/下载.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/toolbar/images/下载.png
--------------------------------------------------------------------------------
/src/components/toolbar/images/量宽.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/toolbar/images/量宽.png
--------------------------------------------------------------------------------
/public/libs/poltmodules/CalculatePlot.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/libs/poltmodules/CalculatePlot.js
--------------------------------------------------------------------------------
/src/components/search/images/dining.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/dining.png
--------------------------------------------------------------------------------
/src/components/search/images/finance.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/finance.png
--------------------------------------------------------------------------------
/src/components/search/images/health.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/health.png
--------------------------------------------------------------------------------
/src/components/search/images/icon_往返.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/icon_往返.png
--------------------------------------------------------------------------------
/src/components/search/images/icon_终.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/icon_终.png
--------------------------------------------------------------------------------
/src/components/search/images/icon_起.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/icon_起.png
--------------------------------------------------------------------------------
/src/components/search/images/service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/service.png
--------------------------------------------------------------------------------
/public/images/busline/svg_location_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/busline/svg_location_red.png
--------------------------------------------------------------------------------
/src/components/layerList/img/defaultmap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/layerList/img/defaultmap.png
--------------------------------------------------------------------------------
/src/components/search/images/carservice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/carservice.png
--------------------------------------------------------------------------------
/src/components/search/images/community.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/community.png
--------------------------------------------------------------------------------
/src/components/search/images/education.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/education.png
--------------------------------------------------------------------------------
/src/components/search/images/enterprise.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/enterprise.png
--------------------------------------------------------------------------------
/src/components/search/images/entertain.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/entertain.png
--------------------------------------------------------------------------------
/src/components/search/images/icon_bus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/icon_bus.png
--------------------------------------------------------------------------------
/src/components/search/images/icon_walk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/icon_walk.png
--------------------------------------------------------------------------------
/src/components/search/images/shopping.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/shopping.png
--------------------------------------------------------------------------------
/src/components/search/images/transport.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/transport.png
--------------------------------------------------------------------------------
/src/components/mapviewer/basemap/img/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/mapviewer/basemap/img/map.png
--------------------------------------------------------------------------------
/src/components/popups/images/transparent.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/popups/images/transparent.gif
--------------------------------------------------------------------------------
/src/components/search/images/featurespot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/featurespot.png
--------------------------------------------------------------------------------
/src/components/search/images/icon_subway.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/icon_subway.png
--------------------------------------------------------------------------------
/src/components/search/images/organization.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/organization.png
--------------------------------------------------------------------------------
/public/images/busline/svg_location_highlight.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/public/images/busline/svg_location_highlight.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/BaseMap/img/btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/BaseMap/img/btn.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/BaseMap/img/dtqh.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/BaseMap/img/dtqh.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/BaseMap/img/dtqh1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/BaseMap/img/dtqh1.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/BaseMap/img/earth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/BaseMap/img/earth.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/BaseMap/img/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/BaseMap/img/map.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/光照.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/光照.jpg
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/导图.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/导图.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/手指.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/手指.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/旋转.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/旋转.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/移动.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/移动.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/量面.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/量面.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/量高.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/量高.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/鱼眼.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/鱼眼.png
--------------------------------------------------------------------------------
/src/components/search/images/icon_circle_red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/icon_circle_red.png
--------------------------------------------------------------------------------
/src/services/example.js:
--------------------------------------------------------------------------------
1 | import request from '../utils/request';
2 |
3 | export function query() {
4 | return request('/api/users');
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/人视角.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/人视角.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/images/天气特效.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/toolbar/images/天气特效.png
--------------------------------------------------------------------------------
/src/components/search/images/icon_circle_green.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/icon_circle_green.png
--------------------------------------------------------------------------------
/src/components/search/images/publicfacilities.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/publicfacilities.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/Layerlist/images/rzfx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/Layerlist/images/rzfx.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/Layerlist/images/rzfx1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/Layerlist/images/rzfx1.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/Measure3Dbutton/dwcj.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/Measure3Dbutton/dwcj.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/Measure3Dbutton/dwcj1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/Measure3Dbutton/dwcj1.png
--------------------------------------------------------------------------------
/src/components/search/images/route-icon_2c25ce2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/search/images/route-icon_2c25ce2.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/BaseMap/img/btn_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/BaseMap/img/btn_selected.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/Layerlist/images/layers1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/Layerlist/images/layers1.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/Layerlist/images/layers2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/Layerlist/images/layers2.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/LightShadow/images/rzfx.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/LightShadow/images/rzfx.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/LightShadow/images/rzfx1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/LightShadow/images/rzfx1.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/ToolbarRight.css:
--------------------------------------------------------------------------------
1 | .toolbar-right {
2 | position: absolute;
3 | top: 15px;
4 | right: 15px;
5 | z-index: 10;
6 | }
7 |
--------------------------------------------------------------------------------
/src/components/layout/index.js:
--------------------------------------------------------------------------------
1 | export { default as ScrollContent } from './ScrollContent';
2 | export { default as AccordionContent } from './AccordionContent';
3 |
--------------------------------------------------------------------------------
/src/utils/arcgis/index.js:
--------------------------------------------------------------------------------
1 | import _ from 'lodash';
2 |
3 | export default {
4 | isViewReady() {
5 | return _.get(window.agsGlobal, 'view');
6 | },
7 | };
8 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/ModifyDataSource/images/tjss.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/ModifyDataSource/images/tjss.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/ModifyDataSource/images/tjss1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/ModifyDataSource/images/tjss1.png
--------------------------------------------------------------------------------
/src/components/splitScreen/index.css:
--------------------------------------------------------------------------------
1 | .viewsplitDiv {
2 | flex: auto;
3 | margin: 0;
4 | padding: 0;
5 | display: flex;
6 | position: relative;
7 | }
--------------------------------------------------------------------------------
/src/constants/app.js:
--------------------------------------------------------------------------------
1 | export const APP_ID = window.appcfg.clientId;
2 | export const APP_PORTAL_URL = window.appcfg.portal;
3 | export const APP_SIGNIN_URL = window.appcfg.signin;
4 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/Measure3Dbutton/images/icon_measure1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/Measure3Dbutton/images/icon_measure1.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/Measure3Dbutton/images/icon_measure2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/Measure3Dbutton/images/icon_measure2.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/ModifyDataSource/images/icon_search1-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/ModifyDataSource/images/icon_search1-01.png
--------------------------------------------------------------------------------
/src/components/sceneviewer/ModifyDataSource/images/icon_search2-01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/ModifyDataSource/images/icon_search2-01.png
--------------------------------------------------------------------------------
/src/components/search/support/converters.js:
--------------------------------------------------------------------------------
1 | export function shortenText(text) {
2 | if (text.length < 4) {
3 | return text;
4 | }
5 |
6 | return `${text.substr(0, 4)}...`;
7 | }
8 |
--------------------------------------------------------------------------------
/src/services/distinct.js:
--------------------------------------------------------------------------------
1 | import request from '../utils/request';
2 |
3 | export default function loadJson() {
4 | return request('./config/fjLocation.json', {
5 | method: 'GET',
6 | handleAs: 'json',
7 | });
8 | }
9 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "singleQuote": true,
3 | "trailingComma": "es5",
4 | "printWidth": 100,
5 | "overrides": [
6 | {
7 | "files": ".prettierrc",
8 | "options": { "parser": "json" }
9 | }
10 | ]
11 | }
--------------------------------------------------------------------------------
/src/components/sceneviewer/ModifyDataSource/ModifyDataSourcePanle/component/dataItem/img/data.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/esrichina/geomap/HEAD/src/components/sceneviewer/ModifyDataSource/ModifyDataSourcePanle/component/dataItem/img/data.png
--------------------------------------------------------------------------------
/src/constants/geomap-utils.js:
--------------------------------------------------------------------------------
1 | // const GeomapUtis = window.agsUtils;
2 | // const { jsapi } = GeomapUtis;
3 | import geomapUtils from '@geomap/utils';
4 | const { jsapi } = geomapUtils;
5 |
6 | export { jsapi };
7 | export default geomapUtils;
8 |
--------------------------------------------------------------------------------
/src/components/search/support/conditions.js:
--------------------------------------------------------------------------------
1 | import * as SearchConsts from '../../../constants/search';
2 |
3 | /**
4 | * 判断当前Search是否为POI查找
5 | */
6 | export function isSearchingPoi(mode) {
7 | return mode === SearchConsts.MODE_LOCATION;
8 | }
9 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "eslint-config-umi",
3 | "plugins": [
4 | "react-hooks"
5 | ],
6 | "globals": {
7 | "echarts": true,
8 | "THREE": true
9 | },
10 | "rules": {
11 | "react-hooks/rules-of-hooks": "error"
12 | }
13 | }
--------------------------------------------------------------------------------
/src/components/layout/ScrollContent.jsx:
--------------------------------------------------------------------------------
1 | import CustomScroll from 'react-custom-scrollbars';
2 |
3 | import styles from './index.css';
4 |
5 | const AccordionContent = ({ children }) => {
6 | return {children};
7 | };
8 |
9 | export default CustomScroll;
--------------------------------------------------------------------------------
/src/global.css:
--------------------------------------------------------------------------------
1 | html,
2 | body,
3 | #root {
4 | margin: 0;
5 | padding: 0;
6 | height: 100%;
7 | width: 100%;
8 | }
9 |
10 | /*
11 | 修改toolbar2d下拉框样式
12 | */
13 | .ant-dropdown-menu-item, .ant-dropdown-menu-submenu-title{
14 | font-size: 12px;
15 | padding: 5px 15px;
16 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # umi temp folder
7 | /src/pages/.umi
8 |
9 | # production
10 | /dist
11 |
12 | # misc
13 | .DS_Store
14 | npm-debug.log*
15 | yarn-error.log
--------------------------------------------------------------------------------
/src/components/layout/AccordionContent.jsx:
--------------------------------------------------------------------------------
1 | import CustomScroll from 'react-custom-scrollbars';
2 |
3 | import styles from './index.css';
4 |
5 | const AccordionContent = ({ children }) => {
6 | return {children};
7 | };
8 |
9 | export default CustomScroll;
10 |
--------------------------------------------------------------------------------
/src/models/toolbar.js:
--------------------------------------------------------------------------------
1 | export default {
2 | namespace: 'toolbar',
3 |
4 | state: {
5 | current: null,
6 | },
7 |
8 | effects: {},
9 |
10 | reducers: {
11 | updateCurrentView(state, action) {
12 | return { ...state, current: action.payload };
13 | },
14 | },
15 | };
16 |
--------------------------------------------------------------------------------
/src/components/search/routes/BusyIndicator.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | margin-top: 10px;
3 | width: 374px;
4 | background: #fff;
5 | display: flex;
6 | flex-direction: row;
7 | align-items: center;
8 | }
9 |
10 | .loadingimg {
11 | width: 140px;
12 | height: 70px;
13 | }
14 |
15 | .text {
16 | color: #000;
17 | }
18 |
--------------------------------------------------------------------------------
/src/constants/layer-index.js:
--------------------------------------------------------------------------------
1 | // --------------------------------------------------------
2 | // 定义所有的业务图层在MapView | SceneView中的顺序
3 | // --------------------------------------------------------
4 |
5 | /**
6 | * 公交换乘图层
7 | */
8 | export const IDX_LAYER_BUS = 1;
9 |
10 | /**
11 | * POI & 分类查询图层
12 | */
13 | export const IDX_LAYER_SEARCH = 2;
14 |
--------------------------------------------------------------------------------
/src/components/overviewmap/Overviewmap.css:
--------------------------------------------------------------------------------
1 | .overviewMapDiv {
2 | position: absolute;
3 | z-index: 10000;
4 | bottom: 20px;
5 | left: 20px;
6 | }
7 | .overviewDiv {
8 | width: 300px;
9 | height: 200px;
10 | border: 1px solid black;
11 | z-index: 9999;
12 | }
13 |
14 | .extentDiv {
15 | background-color: rgba(0, 0, 0, 0.5);
16 | position: absolute;
17 | z-index: 2;
18 | }
19 |
--------------------------------------------------------------------------------
/src/components/search/routes/ErrorIndicator.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | margin-top: 10px;
3 | width: 374px;
4 | background: #fff;
5 | padding: 15px;
6 | display: flex;
7 | flex-direction: row;
8 | align-items: center;
9 | }
10 |
11 | .icon {
12 | display: inline-block;
13 | height: 40px;
14 | width: 40px;
15 | }
16 |
17 | .msg {
18 | font-size: 15px;
19 | margin-left: 10px;
20 | color: orange;
21 | }
--------------------------------------------------------------------------------
/src/components/mapviewer/basemap/index.less:
--------------------------------------------------------------------------------
1 | .wrap {
2 | width: auto;
3 | flex-direction: column;
4 | background: #fff;
5 | padding: 0;
6 | color: white;
7 | z-index: 999;
8 | border: 2px solid #ffffff;
9 | cursor: pointer;
10 |
11 | img {
12 | vertical-align: none !important;
13 | width: 64px;
14 | height: 64px;
15 | }
16 | }
17 | .wrap:hover {
18 | border: 2px solid #2093ef;
19 | }
20 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // 使用 IntelliSense 了解相关属性。
3 | // 悬停以查看现有属性的描述。
4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "type": "chrome",
9 | "request": "launch",
10 | "name": "启动 Chrome 并打开 localhost",
11 | "url": "http://lbs.geoplat.test:8013",
12 | "webRoot": "${workspaceFolder}"
13 | }
14 | ]
15 | }
--------------------------------------------------------------------------------
/src/components/mapviewer/compass/index.css:
--------------------------------------------------------------------------------
1 | .compassBtn {
2 | display: inline-block;
3 | cursor: pointer;
4 | margin: 6px;
5 | width: 36px !important;
6 | height: 36px !important;
7 | border-radius: 50%;
8 | text-align: center;
9 | position: relative;
10 | z-index: 1;
11 | box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
12 | transition: color 0.3s;
13 | background: #fff;
14 | font-size: 24px;
15 | font-weight: bold;
16 | }
17 |
--------------------------------------------------------------------------------
/src/components/search/routes/BusyIndicator.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 |
3 | import busyImg from '../images/timg.gif';
4 | import styles from './BusyIndicator.css';
5 |
6 | const BusyIndicator = () => {
7 | return (
8 |
9 |

10 |
正在规划路径... ...
11 |
12 | );
13 | };
14 |
15 | export default BusyIndicator;
16 |
--------------------------------------------------------------------------------
/src/components/trans3d/index.css:
--------------------------------------------------------------------------------
1 |
2 |
3 | .tranfBtn {
4 | display: inline-block;
5 | cursor: pointer;
6 | width: 25px !important;
7 | height: 25px !important;
8 | text-align: center;
9 | position: relative;
10 | z-index: 1;
11 | transition: color 0.3s;
12 | background: #fff;
13 | color: #4c4c4c;
14 | font-family: 'Microsoft YaHei';
15 | font-size: 12px;
16 | font-weight: bold;
17 | padding-top: 4px;
18 | box-shadow: rgba(0, 0, 0, 0.15) 1px 2px 1px;
19 | }
20 |
--------------------------------------------------------------------------------
/src/services/portal4ags/item/totalWebScene.js:
--------------------------------------------------------------------------------
1 | // import request from '../../utils/request';
2 | import jQuery from 'jquery';
3 |
4 | export default function getTotalWebScene(dataObj) {
5 |
6 | const requestUrl = "http://esrichina3d.arcgisonline.cn/portal/sharing/search?f=json&" +
7 | "num=100&start=1&sortField=modified&sortOrder=desc&" +
8 | "q=type:'Web Scene' ";
9 | return jQuery.ajax({
10 | type: 'GET',
11 | url: requestUrl,
12 | dataType: 'json' //dataType不能少
13 | });
14 | }
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/point.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/widgets/index.js:
--------------------------------------------------------------------------------
1 | import MeasureLine2D from './MeasureLine2D';
2 | import MeasureArea2D from './MeasureArea2D';
3 | import MeasureLine3D from './MeasureLine3D';
4 | import MeasureArea3D from './MeasureArea3D';
5 | import Legend from './Legend';
6 | import PrintMap2D from './PrintMap2D';
7 | import ViewClipMap from './ViewClipMap';
8 |
9 | export {
10 | MeasureLine2D,
11 | MeasureArea2D,
12 | Legend,
13 | MeasureLine3D,
14 | MeasureArea3D,
15 | PrintMap2D,
16 | ViewClipMap,
17 | };
18 |
--------------------------------------------------------------------------------
/src/services/mapcorrectp.js:
--------------------------------------------------------------------------------
1 | import request from '../utils/request';
2 |
3 | const addMapErrorBatchUsingPOST =
4 | 'http://192.168.190.124/geoplatservice/maperror/addMapErrorBatch';
5 |
6 | export function mapcorrectp(data) {
7 | const dataJson = JSON.stringify(data);
8 | return request(addMapErrorBatchUsingPOST, {
9 | method: 'POST',
10 | body: dataJson,
11 | headers: new Headers({
12 | 'Content-Type': 'application/json',
13 | }),
14 | // dataType: 'json',
15 | });
16 | }
17 |
--------------------------------------------------------------------------------
/src/utils/jsapi.js:
--------------------------------------------------------------------------------
1 | import esriLoader from 'esri-loader';
2 |
3 | function configEsriLoader() {
4 | esriLoader.utils.Promise = Promise;
5 | }
6 |
7 | export default function preload() {
8 | return esriLoader.loadScript({
9 | dojoConfig: window.dojoConfig,
10 | url: window.apiRoot,
11 | });
12 | }
13 |
14 | export function load(modules) {
15 | configEsriLoader();
16 | return esriLoader.loadModules(modules, {
17 | dojoConfig: window.dojoConfig,
18 | url: window.apiRoot,
19 | });
20 | }
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/point.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/middleware/arcgis/mapview/arcgis-popup.js:
--------------------------------------------------------------------------------
1 | function createPopup(opts = {}) {
2 | // Detect if 'createLogger' was passed directly to 'applyMiddleware'.
3 | if (opts.getState && opts.dispatch) {
4 | return () => (next) => (action) => next(action);
5 | }
6 | return () => (next) => (action) => {
7 | switch (action.type) {
8 | default: {
9 | next(action);
10 | break;
11 | }
12 | }
13 | return Promise.resolve();
14 | };
15 | }
16 |
17 | export { createPopup };
18 |
--------------------------------------------------------------------------------
/src/components/search/SearchResultCollapsePanel.css:
--------------------------------------------------------------------------------
1 | .searchResultCollapsePanel{
2 | position: absolute;
3 | top: 114px;
4 | left: 15px;
5 | width: 397px;
6 | /* z-index: 9; */
7 | bottom: 15px;
8 | overflow-x: hidden;
9 | overflow-y: hidden;
10 |
11 | }
12 |
13 | .collapsePanel{
14 | background: transparent !important;
15 | }
16 | .panelCloseBtn{
17 | float: right;
18 | line-height: 26px;
19 | }
20 | .panelTitleReturn{
21 | color: #3385ff;
22 | cursor: pointer;
23 | }
--------------------------------------------------------------------------------
/src/utils/arcgis/remarks.js:
--------------------------------------------------------------------------------
1 | // ---------------------------------------------------
2 | // 表面注记
3 | // ---------------------------------------------------
4 |
5 | let inst = null;
6 |
7 | export const ID_REMARK_LAYER = 'id-layer-remark';
8 |
9 | export default class RemarkTool {
10 | constructor() {
11 | this.hoverHandle = null;
12 | this.view = null;
13 | this.store = null;
14 | }
15 |
16 | static instance() {
17 | if (!inst) {
18 | inst = new RemarkTool();
19 | }
20 |
21 | return inst;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/utils/widgets.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ReactDOM from 'react-dom';
3 | import Overviewmap from '../components/overviewmap/Overviewmap';
4 |
5 | export default {
6 | // 鹰眼
7 | createOverView(view) {
8 | const overmapDiv = document.createElement('div');
9 | overmapDiv.id = "overmapDiv";
10 | view.ui.add(overmapDiv, {
11 | position: 'bottom-left',
12 | });
13 | ReactDOM.render(, overmapDiv);
14 | // 默认2d不显示鹰眼
15 | overmapDiv.style.display = 'none';
16 | },
17 | };
18 |
--------------------------------------------------------------------------------
/src/services/portal4ags/item/totalSceneLayerItem.js:
--------------------------------------------------------------------------------
1 | // import request from '../../utils/request';
2 | import jQuery from 'jquery';
3 |
4 | export default function getTotalSceneLayerItem(dataObj) {
5 | const requestUrl = 'http://esrichina3d.arcgisonline.cn/portal/sharing/search?f=json&' +
6 | 'num=100&start=1&sortField=modified&sortOrder=desc&' +
7 | 'q=owner:' + dataObj.owner + ' (type:"Scene Service") -type:("Code Attachment" OR "Featured Items")';
8 | return jQuery.ajax({
9 | type: 'GET',
10 | url: requestUrl,
11 | dataType: 'json' // dataType不能少
12 | });
13 | }
--------------------------------------------------------------------------------
/src/components/sceneviewer/common/btnStyle.less:
--------------------------------------------------------------------------------
1 | .btnStyle {
2 | display: flex;
3 | justify-content: center;
4 | align-items: center;
5 | height: 38px;
6 | width: 38px;
7 | // border: 1px solid #c4c8cc;
8 | background: rgba(255, 255, 255, 1);
9 | color: #384750;
10 | cursor: pointer;
11 | font-size: 22px;
12 | border-radius: 0 !important;
13 | }
14 |
15 | .btnA {
16 | border: 0px;
17 | border-radius: 0px;
18 | width: 20px;
19 | height: 20px;
20 | font-size: 12px;
21 | }
22 |
23 | .btnImg {
24 | border: 0px;
25 | border-radius: 0px;
26 | width: 20px;
27 | height: 20px;
28 | }
29 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/ModifyDataSource/index.css:
--------------------------------------------------------------------------------
1 | .btnStyle {
2 | display: flex;
3 | justify-content: center;
4 | align-items: center;
5 | height: 38px;
6 | width: 38px;
7 | border: 1px solid #c4c8cc;
8 | background: rgba(255, 255, 255, 1);
9 | color: #384750;
10 | cursor: pointer;
11 | font-size: 22px;
12 | border-radius: 0 !important;
13 | }
14 |
15 | .btnA {
16 | border: 0px;
17 | border-radius: 0px;
18 | width: 20px;
19 | height: 20px;
20 | font-size: 12px;
21 | }
22 |
23 | .btnImg {
24 | border: 0px;
25 | border-radius: 0px;
26 | width: 20px;
27 | height: 20px;
28 | }
29 |
--------------------------------------------------------------------------------
/src/components/plot/geometryAttributeEditor/GeometryAttribute.less:
--------------------------------------------------------------------------------
1 | .wrap {
2 | // position: relative;
3 | width: 100%;
4 | // max-height: 550px;
5 | // padding: 5px 20px;
6 | .title {
7 | padding-left: 15px;
8 | padding-bottom: 10px;
9 | }
10 | .settingdiv {
11 | display: block;
12 | .leftsetting {
13 | height: 50px;
14 | width: 150px;
15 | line-height: 50px;
16 | float: left;
17 | text-align: center;
18 | }
19 | .rightsetting {
20 | height: 50px;
21 | width: 220px;
22 | line-height: 50px;
23 | float: left;
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/circle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/services/portal4ags/item/itemInfo.js:
--------------------------------------------------------------------------------
1 | // import request from '../../utils/request';
2 | import jQuery from 'jquery';
3 |
4 | export default function getItemInfo(dataObj) {
5 | // https://feng.arcgisonline.cn/portal/sharing/rest/content/items/ec3fcdb9194544b4adc934ed880c8c69?f=json
6 | const requestUrl =
7 | 'https://' +
8 | dataObj.domainName +
9 | '/' +
10 | dataObj.webAdaptorName +
11 | '/sharing/rest/content/items/' +
12 | dataObj.itemId + '?f=json&token=' +
13 | dataObj.token;
14 | return jQuery.ajax({
15 | type: 'GET',
16 | url: requestUrl,
17 | dataType: 'json' //dataType不能少
18 | });
19 | }
20 |
--------------------------------------------------------------------------------
/src/middleware/arcgis/sceneview/arcgis-toolbar.js:
--------------------------------------------------------------------------------
1 |
2 | import {
3 | ACTION_MAP_PRINT_3D,
4 | } from '../../../constants/action-types';
5 | // 获取全局ags对象,用于其他组件获取其中的view对象
6 |
7 | function toolbar(opts = {}) {
8 | if (opts.getState && opts.dispatch) {
9 | return () => next => action => next(action);
10 | }
11 |
12 | return () => next => action => {
13 | const ags = window.agsGlobal;
14 | switch (action.type) {
15 | // lih 20180725 工具条-环绕漫游
16 |
17 | default: {
18 | next(action);
19 | break;
20 | }
21 | }
22 |
23 | return Promise.resolve();
24 | };
25 | }
26 |
27 | export { toolbar };
28 |
--------------------------------------------------------------------------------
/src/components/search/routes/index.js:
--------------------------------------------------------------------------------
1 | import TypeSelector from './CircuitTypeSelector';
2 | import BusLineList from './BusLineResult';
3 | import DriveLineList from './DriveLineResult';
4 | import RideLineList from './RideLineResult';
5 | import WalkLineList from './WalkLineResult';
6 | import StartEndSelector from './TerminalSelector';
7 | import ErrorTpl from './ErrorIndicator';
8 | import BusyTpl from './BusyIndicator';
9 | import RoutePlanTpl from './RoutePlan';
10 | import RouteLSelector from './RouteLocationSelector';
11 |
12 | export { TypeSelector, BusLineList, DriveLineList, RideLineList, WalkLineList, StartEndSelector, ErrorTpl, BusyTpl, RoutePlanTpl, RouteLSelector };
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/font.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/font.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/search/routes/ErrorIndicator.jsx:
--------------------------------------------------------------------------------
1 | import { useRef, useState, useEffect } from 'react';
2 | // import React from 'react';
3 | import PropTypes from 'prop-types';
4 | import { connect } from 'dva';
5 |
6 | import imgSrc from '../images/fail.gif';
7 |
8 | import styles from './ErrorIndicator.css';
9 |
10 | const ErrorIndicator = props => {
11 | return (
12 |
13 |

14 |
{this.props.msg}
15 |
16 | );
17 | }
18 |
19 | ErrorIndicator.propTypes = {
20 | msg: PropTypes.string,
21 | };
22 |
23 | export default connect()(ErrorIndicator);
--------------------------------------------------------------------------------
/src/components/sceneviewer/compass/index.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | display: flex;
3 | flex-direction: column;
4 | margin-bottom: 10px;
5 | }
6 |
7 | .btn {
8 | display: flex;
9 | justify-content: center;
10 | align-items: center;
11 | height: 38px;
12 | width: 38px;
13 | border: 1px solid #C4C8CC;
14 | background: rgba(255,255,255,1);
15 | color: #384750;
16 | cursor: pointer;
17 | font-size: 22px;
18 | }
19 |
20 | .btn.active {
21 | background: #3285ff;
22 | }
23 |
24 | .roundBtn {
25 | composes: btn;
26 | border-radius: 50%;
27 | }
28 |
29 | .btn:global(.disabled) {
30 | cursor: no-drop;
31 | }
32 |
33 | .btn:hover {
34 | color: #0079c1;
35 | background-color: #edf7fd;
36 | }
37 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/zoom/index.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | display: flex;
3 | flex-direction: column;
4 | margin-bottom: 10px;
5 | }
6 |
7 | .btn {
8 | display: flex;
9 | justify-content: center;
10 | align-items: center;
11 | height: 38px;
12 | width: 38px;
13 | border: 1px solid #c4c8cc;
14 | background: rgba(255, 255, 255, 1);
15 | color: #384750;
16 | cursor: pointer;
17 | font-size: 22px;
18 | }
19 |
20 | .btn.active {
21 | background: #3285ff;
22 | }
23 |
24 | .roundBtn {
25 | composes: btn;
26 | border-radius: 50%;
27 | }
28 |
29 | .btn:global(.disabled) {
30 | cursor: no-drop;
31 | }
32 |
33 | .btn:hover {
34 | color: #0079c1;
35 | background-color: #edf7fd;
36 | }
37 |
--------------------------------------------------------------------------------
/src/services/portal4ags/user/totalUser.js:
--------------------------------------------------------------------------------
1 | // import request from '../../utils/request';
2 | import jQuery from 'jquery';
3 |
4 | export default function getTotalUser(dataObj) {
5 | // https://feng.arcgisonline.cn/portal/sharing/rest/portals/0123456789ABCDEF/users
6 | const requestUrl =
7 | 'https://' +
8 | dataObj.domainName +
9 | '/' +
10 | dataObj.webAdaptorName +
11 | '/sharing/rest/portals/0123456789ABCDEF/users';
12 |
13 | const dataObjFinal = {
14 | token: dataObj.token, // token.
15 | f: 'json'
16 | };
17 | return jQuery.ajax({
18 | type: 'POST',
19 | url: requestUrl,
20 | data: dataObjFinal,
21 | dataType: 'json' //dataType不能少
22 | });
23 | }
24 |
--------------------------------------------------------------------------------
/src/components/splitScreen/index.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component, useState, useRef } from 'react';
2 | import { connect } from 'dva';
3 | import ToolbarSplit from '../toolbar/ToolbarSplit';
4 |
5 | import styles from './index.css';
6 | /**
7 | * 分屏对比组件
8 | * @author wangxd
9 | */
10 |
11 | const SplitScreen = ({ agsmap }) => {
12 | return (
13 |
20 |
21 |
22 | );
23 | };
24 |
25 | export default connect(({ agsmap }) => {
26 | return {
27 | agsmap,
28 | };
29 | })(SplitScreen);
30 |
--------------------------------------------------------------------------------
/src/components/toolbar/ToolbarSplit.css:
--------------------------------------------------------------------------------
1 | .toolbarSplit {
2 | position: absolute;
3 | top: 20px;
4 | right: 20px;
5 | color: red;
6 | z-index: 10;
7 | }
8 |
9 | .btnStyle {
10 | color: #5f6477;
11 | border: none;
12 | font-family: Arial, sans-serif;
13 | font-size: 12px;
14 | border-radius: 0px !important;
15 | height: 38px;
16 | }
17 |
18 | .btnStyle:not(:last-child):after {
19 | content: '';
20 | display: block;
21 | z-index: 1;
22 | visibility: visible;
23 | width: 1px;
24 | background: #e8e8e8;
25 | position: absolute;
26 | top: 9px;
27 | bottom: 9px;
28 | right: -1px;
29 | margin-right: 1px
30 | }
31 |
32 |
33 | .buttonGroup {
34 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
35 | }
--------------------------------------------------------------------------------
/src/components/toolbar/Toolbar2D.css:
--------------------------------------------------------------------------------
1 | .toolbar {
2 | z-index: 10;
3 | position: absolute;
4 | top: 20px;
5 | right: 10px;
6 | }
7 | .noradius {
8 | border-radius: 0px;
9 | }
10 |
11 | .btnStyle {
12 | color: #5f6477;
13 | border: none;
14 | font-family: Arial, sans-serif;
15 | font-size: 12px;
16 | border-radius: 0px !important;
17 | height: 38px;
18 | }
19 | .buttonGroup{
20 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
21 | }
22 | .btnStyle:not(:last-child):after {
23 | content: '';
24 | display: block;
25 | z-index: 1;
26 | visibility: visible;
27 | width: 1px;
28 | background: #e8e8e8;
29 | position: absolute;
30 | top: 9px;
31 | bottom: 9px;
32 | right: -1px;
33 | margin-right: 1px
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/src/services/tianditu/busline.js:
--------------------------------------------------------------------------------
1 | import request from '../../utils/request';
2 |
3 | const URL_BUS_LINE = 'http://api.tianditu.gov.cn/transit';
4 |
5 | /**
6 | * 关于linetype: 第0位为1,较快捷;第1位为1,少换乘;第2位为1,少步行;第3位为1,不坐地铁;
7 | * @param {*} startposition
8 | * @param {*} endposition
9 | */
10 | export function planBusLine(startposition, endposition) {
11 | const p = new URLSearchParams();
12 | p.append('type', 'busline');
13 | p.append('tk', window.geosearchcfg.tianditu.key);
14 | p.append(
15 | 'postStr',
16 | JSON.stringify({
17 | startposition,
18 | endposition,
19 | linetype: '1',
20 | }),
21 | );
22 |
23 | return request(`${URL_BUS_LINE}?${p.toString()}`, {
24 | method: 'GET',
25 | });
26 | }
27 |
--------------------------------------------------------------------------------
/src/components/content/index.css:
--------------------------------------------------------------------------------
1 | .panelWrap {
2 | display: flex;
3 | flex-direction: column;
4 | width: 100%;
5 | max-height: 100%;
6 | pointer-events: all;
7 | background: white;
8 | border-radius: 4px;
9 | box-shadow: 0 0 5px rgba(0, 0, 0, 0.38);
10 | }
11 |
12 | .panelWrap .panelHead {
13 | flex: none;
14 | height: 40px;
15 | display: flex;
16 | flex-direction: row;
17 | align-items: center;
18 | justify-content: space-between;
19 | padding: 0 10px;
20 | border-radius: 4px 4px 0 0;
21 | background-color: #eee;
22 | }
23 |
24 | .panelWrap .panelHead span:nth-child(2) {
25 | color: red;
26 | font-size: 16px;
27 | cursor: pointer;
28 | }
29 |
30 | .panelWrap .panelContent {
31 | flex: 1;
32 | padding: 10px;
33 | }
34 |
--------------------------------------------------------------------------------
/src/services/tianditu/driveline.js:
--------------------------------------------------------------------------------
1 | import { requestText } from '../../utils/request';
2 |
3 | const URL_DRIVE_LINE = 'http://api.tianditu.gov.cn/drive';
4 |
5 | /**
6 | * 关于style: 默认0 (0:最快路线,1:最短路线,2:避开高速,3:步行)
7 | * @param {*} startposition
8 | * @param {*} endposition
9 | */
10 | export function planDriveLine(startposition, endposition) {
11 | const p = new URLSearchParams();
12 | p.append('type', 'search');
13 | p.append('tk', window.geosearchcfg.tianditu.key);
14 | p.append(
15 | 'postStr',
16 | JSON.stringify({
17 | orig: startposition,
18 | dest: endposition,
19 | style: '0',
20 | }),
21 | );
22 |
23 | return requestText(`${URL_DRIVE_LINE}?${p.toString()}`, {
24 | method: 'GET',
25 | handleAs: 'text',
26 | });
27 | }
28 |
--------------------------------------------------------------------------------
/src/services/baiduAPI/busline.js:
--------------------------------------------------------------------------------
1 | import {request,requestJsonp} from '../../utils/request';
2 |
3 | const URL_BUS_LINE = 'http://api.tianditu.gov.cn/transit';
4 |
5 | /**
6 | * 关于linetype: 第0位为1,较快捷;第1位为1,少换乘;第2位为1,少步行;第3位为1,不坐地铁;
7 | * @param {*} startposition
8 | * @param {*} endposition
9 | */
10 | export function planBusLine(startposition, endposition) {
11 | let queryUrl = window.searchConfig.busApiUrl;
12 | queryUrl = queryUrl.replace('{origin}', startposition.split(',')[1]+','+startposition.split(',')[0]);
13 | queryUrl = queryUrl.replace('{destination}', endposition.split(',')[1]+','+endposition.split(',')[0]);
14 |
15 | return requestJsonp(`${queryUrl}`, {
16 | method: 'GET',
17 | headers:{
18 | Accept: 'application/json'
19 | },
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/src/services/baiduAPI/rideline.js:
--------------------------------------------------------------------------------
1 | import {request,requestJsonp} from '../../utils/request';
2 |
3 | const URL_BUS_LINE = 'http://api.tianditu.gov.cn/transit';
4 |
5 | /**
6 | * 关于linetype: 第0位为1,较快捷;第1位为1,少换乘;第2位为1,少步行;第3位为1,不坐地铁;
7 | * @param {*} startposition
8 | * @param {*} endposition
9 | */
10 | export function planRideLine(startposition, endposition) {
11 | let queryUrl = window.searchConfig.rideApiUrl;
12 | queryUrl = queryUrl.replace('{origin}', startposition.split(',')[1]+','+startposition.split(',')[0]);
13 | queryUrl = queryUrl.replace('{destination}', endposition.split(',')[1]+','+endposition.split(',')[0]);
14 |
15 | return requestJsonp(`${queryUrl}`, {
16 | method: 'GET',
17 | headers:{
18 | Accept: 'application/json'
19 | },
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/src/services/baiduAPI/walkline.js:
--------------------------------------------------------------------------------
1 | import {request,requestJsonp} from '../../utils/request';
2 |
3 | const URL_BUS_LINE = 'http://api.tianditu.gov.cn/transit';
4 |
5 | /**
6 | * 关于linetype: 第0位为1,较快捷;第1位为1,少换乘;第2位为1,少步行;第3位为1,不坐地铁;
7 | * @param {*} startposition
8 | * @param {*} endposition
9 | */
10 | export function planWalkLine(startposition, endposition) {
11 | let queryUrl = window.searchConfig.walkApiUrl;
12 | queryUrl = queryUrl.replace('{origin}', startposition.split(',')[1]+','+startposition.split(',')[0]);
13 | queryUrl = queryUrl.replace('{destination}', endposition.split(',')[1]+','+endposition.split(',')[0]);
14 |
15 | return requestJsonp(`${queryUrl}`, {
16 | method: 'GET',
17 | headers:{
18 | Accept: 'application/json'
19 | },
20 | });
21 | }
22 |
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/icon-point.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/home/index.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | display: flex;
3 | flex-direction: column;
4 | margin-bottom: 10px;
5 | }
6 |
7 | .btn {
8 | display: flex;
9 | justify-content: center;
10 | align-items: center;
11 | height: 38px;
12 | width: 38px;
13 | border: 1px solid #C4C8CC;
14 | background: rgba(255,255,255,1);
15 | color: #384750;
16 | cursor: pointer;
17 | font-size: 22px;
18 | }
19 |
20 | .btn.active {
21 | background: #3285ff;
22 | }
23 |
24 | .roundBtn {
25 | composes: btn;
26 | border-radius: 50%;
27 | }
28 |
29 | .btn:global(.disabled) {
30 | cursor: no-drop;
31 | }
32 |
33 | .btn:hover {
34 | color: #0079c1;
35 | background-color: #edf7fd;
36 | }
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/icon-point.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/ToolbarRight.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import ModifyDataSource from '../ModifyDataSource/index';
3 | import BaseMap from '../BaseMap/index';
4 | import Layerlist from '../Layerlist/index';
5 | import LightShadow from '../LightShadow/index';
6 | import Measure3Dbutton from '../Measure3Dbutton/index';
7 | import styles from './ToolbarRight.css';
8 |
9 | const ToolbarRight = () => {
10 | return (
11 |
12 | {/* 修改数据源 */}
13 |
14 | {/* 图层列表 */}
15 |
16 | {/* 底图切换 */}
17 |
18 | {/* 光照阴影 */}
19 |
20 | {/* 三维分析 */}
21 |
22 |
23 | );
24 | };
25 |
26 | export default ToolbarRight;
27 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/ModifyDataSource/ModifyDataSourcePanle/component/dataItem/index.jsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 单个资源Item子组件
3 | * @author pensiveant
4 | */
5 | import React, { useState, useEffect } from 'react';
6 | import styles from './index.less';
7 | import DataImg from './img/data.png';
8 |
9 | const DataItem = ({ item, onlayerClick }) => {
10 | return (
11 |
12 |
13 |

14 |
15 |
{item.title}
16 |
{item.type}
17 |
{item.modified}
18 |
19 | );
20 | };
21 |
22 | export default DataItem;
23 |
--------------------------------------------------------------------------------
/src/components/popups/PoiPopup.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import styles from './Popup.css';
3 |
4 | import transparentSrc from './images/transparent.gif';
5 |
6 | class PoiPopup extends React.Component {
7 | render() {
8 | return (
9 |
10 |
11 |
12 | 地址:
13 |
14 | {this.props.graphic.attributes[window.poiCfg[0].locationField]}
15 |
16 |
17 |
18 |
19 |

20 |
在附近找
21 |
22 |
23 | );
24 | }
25 | }
26 |
27 | export default PoiPopup;
28 |
--------------------------------------------------------------------------------
/src/components/mapviewer/zoom/index.css:
--------------------------------------------------------------------------------
1 | .zoomBtn {
2 | display: inline-block;
3 | cursor: pointer;
4 | width: 25px !important;
5 | height: 25px !important;
6 | text-align: center;
7 | position: relative;
8 | z-index: 1;
9 | color: rgba(255, 255, 255, 0.7);
10 | box-shadow: rgba(0, 0, 0, 0.15) 1px 2px 1px;
11 | transition: color 0.3s;
12 | background: #fff;
13 | font-size: 16px;
14 | }
15 | .zoomBtnbottom {
16 | display: inline-block;
17 | cursor: pointer;
18 | width: 25px !important;
19 | height: 25px !important;
20 | text-align: center;
21 | position: relative;
22 | z-index: 1;
23 | color: rgba(255, 255, 255, 0.7);
24 | transition: color 0.3s;
25 | background: #fff;
26 | font-size: 19px;
27 | }
28 |
29 | .iconstyle {
30 | color: #4c4c4c;
31 | }
32 | .iconstyle:hover {
33 | color: #1890ff;
34 | }
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/components/popups/Popup.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | margin: 0;
3 | padding: 0;
4 | display: flex;
5 | flex-direction: column;
6 | }
7 |
8 | .attrWrap {
9 | padding: 10px;
10 | display: flex;
11 | }
12 |
13 | .attrRow {
14 | display: flex;
15 | flex-direction: row;
16 | align-items: flex-start;
17 | }
18 |
19 | .attrLabel {
20 | flex: none;
21 | width: 42px;
22 | }
23 |
24 | .nearbyBar {
25 | border-top: 1px solid #ccc;
26 | border-bottom: 1px solid #ccc;
27 | background: #f8f8f8;
28 | padding: 4px 8px;
29 | }
30 |
31 | .nearbyBar img {
32 | position: relative;
33 | height: 14px;
34 | width: 14px;
35 | margin-right: 8px;
36 | top: -1px;
37 | border: 0;
38 | background-image: url(./images/iw_bg.png);
39 | background-position: -30px -136px;
40 | overflow: hidden;
41 | }
42 |
43 | .nearbyBar span {
44 | color: #3d6dcc;
45 | }
46 |
--------------------------------------------------------------------------------
/src/components/search/routes/CircuitTypeSelector.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | height: 100%;
3 | display: flex;
4 | flex-direction: row;
5 | border-bottom: 1px solid #ececec;
6 | background: white;
7 | }
8 |
9 | .btn {
10 | flex: auto;
11 | /*background: white;*/
12 | color: #fff;
13 | cursor: pointer;
14 | display: flex;
15 | flex-direction: row;
16 | align-items: center;
17 | justify-content: center;
18 | position: relative;
19 | }
20 |
21 | .icon {
22 | display: inline-block;
23 | position: relative;
24 | background-image: url(../images/route-icon_2c25ce2.png);
25 | background-repeat: no-repeat;
26 | color: #fff;
27 | }
28 |
29 | .triangle {
30 | position: absolute;
31 | height: 0px;
32 | width: 0px;
33 | border-left: 5px solid transparent;
34 | border-bottom: 5px solid #1870ff;
35 | border-right: 5px solid transparent;
36 | bottom: 0;
37 | }
38 |
--------------------------------------------------------------------------------
/src/components/plot/geometrySymbolEditor/PointSymbolEditor.less:
--------------------------------------------------------------------------------
1 | .settingdiv {
2 | height: 50px;
3 | .leftsetting {
4 | height: 50px;
5 | display: inline;
6 | width:100px;
7 | line-height: 50px;
8 | float: left;
9 | text-align: center;
10 | }
11 | .rightsetting {
12 | height: 50px;
13 | display: inline;
14 | line-height: 50px;
15 | width:220px;
16 | float: left;
17 | .fillcolor {
18 | margin-top: 9px;
19 | width: 32px;
20 | height: 32px;
21 | border: 1px solid rgba(0, 0, 0, 0.15);
22 | }
23 |
24 | .popover {
25 | position: fixed;
26 | z-index: 999;
27 | .cover {
28 | position: fixed;
29 | top: 0;
30 | right: 0;
31 | bottom: 0;
32 | left: 0;
33 | }
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/components/plot/geometrySymbolEditor/TextSymbolEditor.less:
--------------------------------------------------------------------------------
1 | .settingdiv {
2 | height: 50px;
3 | .leftsetting {
4 | height: 50px;
5 | display: inline;
6 | width:100px;
7 | line-height: 50px;
8 | float: left;
9 | text-align: center;
10 | }
11 | .rightsetting {
12 | height: 50px;
13 | display: inline;
14 | line-height: 50px;
15 | width:220px;
16 | float: left;
17 | .fillcolor {
18 | margin-top: 9px;
19 | width: 32px;
20 | height: 32px;
21 | border: 1px solid rgba(0, 0, 0, 0.15);
22 | }
23 |
24 | .popover {
25 | position: fixed;
26 | z-index: 999;
27 | .cover {
28 | position: fixed;
29 | top: 0;
30 | right: 0;
31 | bottom: 0;
32 | left: 0;
33 | }
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/components/plot/geometrySymbolEditor/PolyGonSymbolEditor.less:
--------------------------------------------------------------------------------
1 | .settingdiv {
2 | height: 50px;
3 | .leftsetting {
4 | height: 50px;
5 | display: inline;
6 | width:100px;
7 | line-height: 50px;
8 | float: left;
9 | text-align: center;
10 | }
11 | .rightsetting {
12 | height: 50px;
13 | display: inline;
14 | line-height: 50px;
15 | width:220px;
16 | float: left;
17 | .fillcolor {
18 | margin-top: 9px;
19 | width: 32px;
20 | height: 32px;
21 | border: 1px solid rgba(0, 0, 0, 0.15);
22 | }
23 |
24 | .popover {
25 | position: fixed;
26 | z-index: 999;
27 | .cover {
28 | position: fixed;
29 | top: 0;
30 | right: 0;
31 | bottom: 0;
32 | left: 0;
33 | }
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/components/plot/geometrySymbolEditor/PolyLineSymbolEditor.less:
--------------------------------------------------------------------------------
1 | .settingdiv {
2 | height: 50px;
3 | .leftsetting {
4 | height: 50px;
5 | display: inline;
6 | width:100px;
7 | line-height: 50px;
8 | float: left;
9 | text-align: center;
10 | }
11 | .rightsetting {
12 | height: 50px;
13 | display: inline;
14 | line-height: 50px;
15 | width:220px;
16 | float: left;
17 | .fillcolor {
18 | margin-top: 9px;
19 | width: 32px;
20 | height: 32px;
21 | border: 1px solid rgba(0, 0, 0, 0.15);
22 | }
23 |
24 | .popover {
25 | position: fixed;
26 | z-index: 999;
27 | .cover {
28 | position: fixed;
29 | top: 0;
30 | right: 0;
31 | bottom: 0;
32 | left: 0;
33 | }
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/ToolbarLeft.css:
--------------------------------------------------------------------------------
1 | .toolbar {
2 | flex-direction: column;
3 | position: absolute;
4 | left: 15px;
5 | top: 15px;
6 | width: 40px;
7 | height: 240px;
8 | z-index: 2;
9 | }
10 |
11 | .wrap {
12 | display: flex;
13 | flex-direction: column;
14 | margin-bottom: 10px;
15 | }
16 |
17 | .btn {
18 | display: flex;
19 | justify-content: center;
20 | align-items: center;
21 | height: 38px;
22 | width: 38px;
23 | border: 1px solid #c4c8cc;
24 | background: rgba(255, 255, 255, 1);
25 | color: #384750;
26 | cursor: pointer;
27 | font-size: 22px;
28 | }
29 |
30 | .btn.active {
31 | background: #3285ff;
32 | }
33 |
34 | .roundBtn {
35 | composes: btn;
36 | border-radius: 50%;
37 | }
38 |
39 | .btn:global(.disabled) {
40 | cursor: no-drop;
41 | }
42 |
43 | .btn:hover {
44 | color: #0079c1;
45 | background-color: #edf7fd;
46 | }
47 |
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/swallowtail_arrow.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/swallowtail_arrow.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/search/SearchResultList.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | flex: 0 1 auto;
3 | margin-top: 4px;
4 | width: 368px;
5 | pointer-events: all;
6 | display: flex;
7 | flex-direction: column;
8 | }
9 |
10 | .bar {
11 | flex: none;
12 | height: 40px;
13 | display: flex;
14 | flex-direction: row;
15 | align-items: center;
16 | padding: 0 10px;
17 | background: white;
18 | }
19 |
20 | .returnIcon {
21 | color: #3285ff;
22 | }
23 |
24 | .barText {
25 | color: #3285ff;
26 | font-size: 14px;
27 | }
28 |
29 | .content {
30 | flex: auto;
31 | margin-top: 4px;
32 | background: white;
33 | padding: 10px 0;
34 | }
35 |
36 | .itemwrap {
37 | padding: 6px 10px;
38 | }
39 |
40 | .itemwrap:hover {
41 | background: #f6f6f6;
42 | }
43 |
44 | .itemtitle {
45 | display: inline-block;
46 | height: 100%;
47 | width: 100%;
48 | cursor: pointer;
49 | }
50 |
51 | .itemdesc {
52 | font-size: 12px;
53 | }
54 |
--------------------------------------------------------------------------------
/src/components/mapviewer/basemap/basemapPanel/index.less:
--------------------------------------------------------------------------------
1 | .BaseMapPanelWrap {
2 | flex-direction: column;
3 | color: #000;
4 | z-index: 102;
5 | border: 2px solid #f7f9faf1;
6 | cursor: pointer;
7 | position: absolute;
8 | right: 75px;
9 | bottom: 0px;
10 | width: 200px;
11 | height: 120px;
12 | background: #fff;
13 | border: 1px solid #eee;
14 | /* opacity: 0.6; */
15 | border-radius: 2px;
16 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.15);
17 |
18 |
19 | .basemapitemwrap {
20 | margin-top: 8px;
21 | border:1px solid rgba(191,191,191,1);
22 | overflow: hidden;
23 | text-overflow: ellipsis;
24 | white-space: nowrap;
25 | }
26 | .basemapitemwrap:hover {
27 | border: 1px solid #2093ef;
28 | }
29 | span {
30 | font-size: 6px;
31 | align-self: auto;
32 | }
33 | img {
34 | vertical-align: none !important;
35 | width: 87px;
36 | height: 64px;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/components/mapviewer/basemap/index.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState } from 'react';
2 | import styles from './index.less';
3 | import defautBmap from './img/map.png';
4 | import BaseMapPanel from './baseMapPanel/';
5 | /**
6 | * 底图切换功能组件
7 | * @author lee
8 | */
9 |
10 | const BaseMap = (props) => {
11 | // bmapPanelVisible 控制是否显示底图选择框
12 | const [bmapPanelVisible, setBmapPanelVisible] = useState(false);
13 | // activeBmapIcon 控制底图显示的图片
14 | const [activeBmapIcon, setActiveBmapIcon] = useState(defautBmap);
15 |
16 | return (
17 |
18 |

setBmapPanelVisible(!bmapPanelVisible)} />
19 |
setActiveBmapIcon(mapIcon)}
22 | hide={() => setBmapPanelVisible(false)}
23 | />
24 |
25 | );
26 | };
27 |
28 | export default BaseMap;
29 |
--------------------------------------------------------------------------------
/public/config/poi.js:
--------------------------------------------------------------------------------
1 | /**
2 | * POI FindTask Config
3 | */
4 |
5 | (function(window) {
6 | // 'http://nanping.arcgisonline.cn/arcgis/rest/services/nanping/wyspoi/MapServer', // Map Service
7 | // 'http://nanping.arcgisonline.cn/arcgis/rest/services/Hosted/POI/FeatureServer/0',
8 |
9 | var hostServer = 'https://geomap.arcgisonline.cn/arcgis';
10 | var serviceRoot = hostServer + '/rest/services';
11 |
12 | var poi = serviceRoot + '/nanping/wyspoi/FeatureServer/0';
13 |
14 | window.tdtCfg = {
15 | // maxBound: '114.9,29.4,119.6,34.6', //安徽省范围
16 | maxBound: '115.7,39.4,117.4,41.6', //北京市范围
17 | };
18 |
19 | window.poiCfg = [
20 | {
21 | url: poi,
22 | searchFields: ['name'],
23 | query: "name LIKE '%$key$%'",
24 | catquery: "type like '$code$%'",
25 | displayField: 'name',
26 | locationField: 'address',
27 | },
28 | ];
29 |
30 | // 表面注记服务
31 | window.remarkCfg = {
32 | url: poi,
33 | };
34 | })(window);
35 |
--------------------------------------------------------------------------------
/src/components/content/ClosePanel.jsx:
--------------------------------------------------------------------------------
1 | import { useState, useRef, useEffect } from 'react';
2 | import { Icon } from 'antd';
3 | import _ from 'lodash';
4 | import CustomScroll from 'react-custom-scrollbars';
5 |
6 | import styles from './index.css';
7 |
8 | const ClosePanel = ({ title, onClose, children, maxHeight }) => {
9 | return (
10 |
11 |
12 | {title}
13 | {
15 | if (_.isFunction(onClose)) {
16 | onClose();
17 | }
18 | }}
19 | >
20 |
21 |
22 |
23 |
24 |
25 | {children}
26 |
27 |
28 |
29 | );
30 | };
31 |
32 | export default ClosePanel;
33 |
--------------------------------------------------------------------------------
/src/services/portal4ags/generateToken.js:
--------------------------------------------------------------------------------
1 | // import request from '../../utils/request';
2 | import jQuery from 'jquery';
3 |
4 | // const generateTokenUrl = 'https://localhost:9991/portal4ags/generateToken';
5 |
6 | export default function generateToken(dataObj) {
7 | // https://feng.arcgisonline.cn/portal/sharing/rest/generateToken
8 | const requestUrl =
9 | 'https://' +
10 | dataObj.domainName +
11 | '/' +
12 | dataObj.webAdaptorName +
13 | '/sharing/rest/generateToken';
14 | const dataObjFinal = {
15 | username: dataObj.username,
16 | password: dataObj.password,
17 | // referer: "localhost", // URL of the sending app.
18 | referer: location.hostname, // URL of the sending app.
19 | expiration: 60, // Lifetime of the token in minutes.
20 | f: 'json'
21 | };
22 | return jQuery.ajax({
23 | type: 'POST',
24 | url: requestUrl,
25 | data: dataObjFinal,
26 | dataType: 'json' //dataType不能少
27 | });
28 | }
29 |
--------------------------------------------------------------------------------
/src/components/measure2dbox/index.less:
--------------------------------------------------------------------------------
1 | .modal {
2 | position: absolute;
3 | top: 49px;
4 | right: 85px;
5 | pointer-events: all;
6 | overflow: hidden;
7 | border-radius: 4px;
8 | width: 270px;
9 | max-height: 430px;
10 | background: #fff;
11 | z-index: 5;
12 | display: flex;
13 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.15);
14 | }
15 | .modalbody {
16 | padding: 10px 10px 10px 10px;
17 | text-align: left;
18 | color: #000;
19 | .row{
20 | margin: 15px ;
21 | }
22 | }
23 | .title {
24 | font-size: 15px;
25 | width: 100%;
26 | line-height: 20px;
27 | padding: 8px 12px;
28 | color: #fff;
29 | background: #1870ff;
30 | border: none;
31 | cursor: move;
32 | }
33 | .close {
34 | float: right;
35 | font-size: 16px;
36 | color: #ffffff;
37 | &:hover{
38 | cursor: pointer;
39 | }
40 | }
41 | .res{
42 | color:#0081c2;
43 | font-size: 16px;
44 | }
45 |
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/rectangle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/rectangle.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/ModifyDataSource/ModifyDataSourcePanle/component/dataItem/index.less:
--------------------------------------------------------------------------------
1 | .dataItem {
2 | width: 240px;
3 | margin-bottom: 30px;
4 | margin-left: 20px;
5 | margin-right: 20px;
6 | }
7 |
8 | .map {
9 | width: 100%;
10 | height: 160px;
11 | border-radius: 2px;
12 | border: 1px solid rgba(196, 200, 204, 1);
13 | }
14 |
15 | .title {
16 | height: 28px;
17 | margin-bottom: 8px;
18 |
19 | font-size: 20px;
20 | font-family: 'PingFangSC-Medium';
21 | font-weight: 500;
22 | color: rgba(56, 71, 80, 1);
23 | line-height: 28px;
24 | text-overflow:ellipsis;
25 | overflow: hidden;
26 | white-space:nowrap;
27 |
28 |
29 | }
30 |
31 | .type,
32 | .modifyTime {
33 | width: 233px;
34 | height: 22px;
35 | margin-bottom: 0;
36 | padding-left: 4px;
37 | font-size: 16px;
38 | font-family: 'PingFangSC-Light';
39 | font-weight: 300;
40 | color: rgba(56, 71, 80, 1);
41 | line-height: 22px;
42 |
43 | }
--------------------------------------------------------------------------------
/src/components/rollerBlind/index.css:
--------------------------------------------------------------------------------
1 | .viewrollDiv {
2 | /* flex: auto;
3 | margin: 0;
4 | padding: 0;
5 | display: flex;
6 | position: relative; */
7 | position: absolute;
8 | top: 0;
9 | left: 0;
10 | width: 100%;
11 | height: 100%;
12 | /*border: 1px solid green;*/
13 | box-sizing: border-box;
14 | pointer-events: none;
15 | clip: rect(0, 10px, 10px, 0);
16 | z-index: 1;
17 | }
18 |
19 | .leftslider {
20 | position: absolute;
21 | top: 0;
22 | left: 0;
23 | margin: 0;
24 | padding: 0;
25 | background-color: red;
26 | width: 4px;
27 | height: 100%;
28 | cursor: col-resize;
29 | z-index: 9;
30 | cursor: pointer;
31 | }
32 |
33 | .topslider {
34 | position: absolute;
35 | top: 0;
36 | left: 0;
37 | margin: 0;
38 | padding: 0;
39 | background-color: red;
40 | height: 4px;
41 | width: 100%;
42 | cursor: col-resize;
43 | z-index: 9;
44 | cursor: pointer;
45 | }
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/general_arrow.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/general_arrow.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/polygon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/polygon.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/BaseMap/basemapitem.jsx:
--------------------------------------------------------------------------------
1 | import React, { useEffect, useState } from 'react';
2 | import { connect } from 'dva';
3 | import styles from './index.less';
4 |
5 | const BaseMapItem = ({ dispatch, data, key, basemapOnChange, activeMapItemid }) => {
6 | const [itemid, stateitemid] = useState(null);
7 | const view = window.agsGlobal.view;
8 |
9 | useEffect(() => {
10 | stateitemid(data.itemId);
11 | }, []);
12 |
13 | function switchBaseMap() {
14 | window.GeomapUtils.view.map2d.switchBaseMapByWebmapId(view, itemid);
15 | basemapOnChange(itemid);
16 | }
17 |
18 | return (
19 |
26 |

32 |
33 | );
34 | };
35 |
36 | export default connect(() => {
37 | return {
38 |
39 | };
40 | })(BaseMapItem);
41 |
--------------------------------------------------------------------------------
/src/utils/arcgis/map/sceneviewUtil.js:
--------------------------------------------------------------------------------
1 | /**
2 | * geomap-uilts 三维备用通用库
3 | * @author lee
4 | */
5 | import * as jsapi from '../../jsapi';
6 | //---------------------------------场景初始化 start----------------------------------------
7 | /**
8 | * 切换三维的旋转方式:平移或者渲染
9 | * @author lee
10 | * @param {object} view 三维场景
11 | * @param {string} tool pan or rotate
12 | */
13 | async function changeToggle(view, tool) {
14 | const [NavigationToggleViewModel] = await jsapi.load([
15 | 'esri/widgets/NavigationToggle/NavigationToggleViewModel',
16 | ]);
17 | const vm = new NavigationToggleViewModel();
18 | vm.view = view;
19 | if (vm.navigationMode !== tool) {
20 | vm.toggle();
21 | }
22 | }
23 | export { changeToggle }
24 |
25 | /**
26 | * 环绕漫游
27 | * @author lee
28 | * @param {object} view 三维场景
29 | */
30 | let roamHandle
31 | function surroundRoam(view) {
32 | if (roamHandle) {
33 | clearInterval(roamHandle);
34 | roamHandle = null;
35 | } else {
36 | roamHandle = setInterval(() => {
37 | view.goTo({ heading: view.camera.heading + 0.5 });
38 | }, 100);
39 | }
40 |
41 | }
42 | export { surroundRoam }
--------------------------------------------------------------------------------
/src/components/plot/poltpanel/PoltPanel.less:
--------------------------------------------------------------------------------
1 | @panelHeight: 835px;
2 | @titleHeight: 36px;
3 | .wrap {
4 | position: absolute;
5 | right: 85px;
6 | top: 116px;
7 | //bottom: 65px;
8 | background: #ffffff;
9 | // border: 1px solid rgba(129, 129, 129, 0.6);
10 | border-radius: 4px 4px 4px 4px;
11 | box-shadow: rgba(0, 0, 0, 0.15) 1px 2px 1px;
12 | width: 425px;
13 | // height: @panelHeight;
14 | // overflow-y: auto;
15 | .title {
16 | font-size: 15px;
17 | width: 100%;
18 | line-height: 20px;
19 | border-radius: 4px 4px 0 0;
20 | padding: 8px 12px;
21 | color: #fff;
22 | background: #1870ff !important;
23 | border: none;
24 | height: @titleHeight;
25 | .close {
26 | float: right;
27 | font-size: 16px;
28 | color: #ffffff;
29 | &:hover {
30 | cursor: pointer;
31 | }
32 | }
33 | }
34 | .content {
35 | // padding-bottom: -50px;
36 | width: 100%;
37 | // height: @panelHeight - @titleHeight;
38 | overflow-y: auto;
39 | // color:#fff;
40 |
41 | }
42 | }
43 | .editTool {
44 | position: absolute;
45 | right:650px;
46 | top:22px;
47 |
48 | }
49 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/BaseMap/Slider.less:
--------------------------------------------------------------------------------
1 |
2 | .slider {
3 | width: 100%;
4 | height: 50px;
5 | position: relative;
6 | .line {
7 | width: 220px;
8 | border-top: 1px solid grey;
9 | }
10 | .scale {
11 | top: 11px;
12 | position: absolute;
13 | border-left: 1px solid grey;
14 | cursor: pointer;
15 | }
16 |
17 | // 滑块
18 | .block {
19 | position: absolute;
20 | top: -11px;
21 | left: 0px;
22 | width: 22px;
23 | height: 22px;
24 | border-radius: 100%;
25 | overflow: hidden;
26 | cursor: pointer;
27 | display: flex;
28 | align-items: center;
29 | justify-content: center;
30 | border: 1px solid grey;
31 | transform: translateX(-50%);
32 | background: #fff;
33 |
34 | .icon-img {
35 | width: 100%;
36 | height: 100%;
37 | background: url(./img/earth.png) no-repeat center center;
38 | background-size: 100% 100%;
39 | }
40 | }
41 |
42 | .number {
43 | position: absolute;
44 | top: 20px;
45 | font-size: 12px;
46 | width: 38px;
47 | text-align: center;
48 | transform: translateX(-50%);
49 | cursor: pointer;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/double_arrow.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/Toolbar3D.less:
--------------------------------------------------------------------------------
1 | .toolbar {
2 | z-index: 10;
3 | position: absolute;
4 | top: 40px;
5 | right: 5%;
6 | }
7 | .noradius {
8 | border-radius: 0px;
9 | }
10 | .btnStyle {
11 | border: 0px;
12 | /* border-radius: 0px; */
13 | border-radius: 10px;
14 | font-size: 12px;
15 | background-color: rgb(54, 52, 52);
16 | opacity: 0.8;
17 | }
18 | .btnStyle:hover {
19 | border: 0px;
20 | border-radius: 0px;
21 | background-color: #fff;
22 | }
23 | .btnStyle:focus {
24 | background: rgb(54, 52, 52);
25 | }
26 | .btnA {
27 | border: 0px;
28 | border-radius: 0px;
29 | width: 20px;
30 | height: 20px;
31 | font-size: 12px;
32 | }
33 | .btnA:hover {
34 | background-color: red;
35 | }
36 |
37 | .btnImg {
38 | border: 0px;
39 | border-radius: 0px;
40 | width: 20px;
41 | height: 20px;
42 | }
43 | .buttonGroup {
44 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.15);
45 | }
46 | .btnStyle:not(:last-child):after {
47 | content: '';
48 | display: block;
49 | z-index: 9;
50 | visibility: visible;
51 | width: 1px;
52 | height: 21px;
53 | background: #eee;
54 | position: absolute;
55 | top: 7px;
56 | right: -1px;
57 | }
58 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/double_arrow.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/app.js:
--------------------------------------------------------------------------------
1 | // import { arcgisAuth } from './middleware/arcgis/arcgis-authentication';
2 | import { createMapView } from './middleware/arcgis/mapview/arcgis-mapview';
3 | import { bookmarks } from './middleware/arcgis/mapview/arcgis-bookmark';
4 | import { search } from './middleware/arcgis/mapview/arcgis-search';
5 | import { createSceneView } from './middleware/arcgis/sceneview/arcgis-sceneview';
6 | import { createPopup } from './middleware/arcgis/mapview/arcgis-popup';
7 | import { toolbar } from './middleware/arcgis/sceneview/arcgis-toolbar';
8 | import { weatherEffects } from './middleware/arcgis/sceneview/arcgis-weatherEffects'; // 天气特效 中间件
9 |
10 |
11 | //pensiveant:加载中间件 arcgis-layerList
12 | import { layerList } from './middleware/arcgis/mapview/arcgis-layerList';
13 |
14 |
15 | export const dva = {
16 | config: {
17 | onAction: [
18 | // arcgisAuth(),
19 | createSceneView(),
20 | createMapView(),
21 | createPopup(),
22 | toolbar(),
23 | bookmarks(),
24 | search(),
25 | layerList(),
26 | weatherEffects(),
27 | ],
28 | onError(err) {
29 | err.preventDefault();
30 | console.error(err.message);
31 | },
32 | },
33 | };
34 |
--------------------------------------------------------------------------------
/src/components/trans3d/index.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { connect } from 'dva';
3 |
4 | import { VIEW_MODE_2D, VIEW_MODE_3D } from '../../constants/action-types';
5 | import styles from './index.css';
6 | /**
7 | * 二三维切换微件
8 | * @author lee
9 | */
10 | const Trans3D = props => {
11 | const transform = () => {
12 | if (props.agsmap.mode === VIEW_MODE_2D) {
13 | props.dispatch({
14 | type: 'agsmap/transMode3d',
15 | payload: VIEW_MODE_3D,
16 | });
17 | } else if (props.agsmap.mode === VIEW_MODE_3D) {
18 | props.dispatch({
19 | type: 'agsmap/transMode2d',
20 | payload: VIEW_MODE_2D,
21 | });
22 | }
23 | };
24 |
25 | return (
26 |
40 | );
41 | };
42 |
43 | export default connect(({ agsmap }) => {
44 | return { agsmap };
45 | })(Trans3D);
46 |
--------------------------------------------------------------------------------
/src/components/layerList/SystemSplitLayer.less:
--------------------------------------------------------------------------------
1 | .wrap{
2 | position: relative;
3 | padding: 12px;
4 | width:100%;
5 | // height:430px;
6 | overflow-y: auto;
7 | .saveToCollection {
8 | position: absolute;
9 | bottom: 10px;
10 | right: 10px;
11 | }
12 | .toolbar{
13 | //padding: 5px 0;
14 | }
15 | .countbar{
16 | float:left;
17 | line-height: 32px;
18 | }
19 | .actionbar{
20 | float: right;
21 | margin-left: -40px;
22 | list-style-type: none;
23 | li{
24 | float: left;
25 | line-height: 32px;
26 | }
27 | li > span{
28 | color: rgba(0, 0, 0, 0.65);
29 | }
30 | .noeffect{
31 | box-shadow: none;
32 | border:none;
33 | padding-left:0;
34 | padding-right:0;
35 | }
36 | }
37 | .layeraction{
38 | color: rgba(0, 0, 0, 0.65);
39 | }
40 |
41 | .layeraction:hover{
42 | color:rgb(24, 144, 255);
43 | }
44 |
45 | .collectionPanel{
46 | border:1px solid #eee;
47 | padding: 8px;
48 | p{
49 | margin-top:8px;
50 | }
51 | }
52 |
53 | .treediv{
54 | overflow: auto;
55 | // height:100%;
56 | }
57 | }
--------------------------------------------------------------------------------
/src/components/layerTree/systemLayer/SystemLayer.less:
--------------------------------------------------------------------------------
1 | .wrap{
2 | position: relative;
3 | padding: 12px;
4 | width:100%;
5 | // height:430px;
6 | overflow-y: auto;
7 | .saveToCollection {
8 | position: absolute;
9 | bottom: 10px;
10 | right: 10px;
11 | }
12 | .toolbar{
13 | //padding: 5px 0;
14 | }
15 | .countbar{
16 | float:left;
17 | line-height: 32px;
18 | }
19 | .actionbar{
20 | float: right;
21 | margin-left: -40px;
22 | list-style-type: none;
23 | li{
24 | float: left;
25 | line-height: 32px;
26 | }
27 | li > span{
28 | color: rgba(0, 0, 0, 0.65);
29 | }
30 | .noeffect{
31 | box-shadow: none;
32 | border:none;
33 | padding-left:0;
34 | padding-right:0;
35 | }
36 | }
37 | .layeraction{
38 | color: rgba(0, 0, 0, 0.65);
39 | }
40 |
41 | .layeraction:hover{
42 | color:rgb(24, 144, 255);
43 | }
44 |
45 | .collectionPanel{
46 | border:1px solid #eee;
47 | padding: 8px;
48 | p{
49 | margin-top:8px;
50 | }
51 | }
52 |
53 | .treediv{
54 | overflow: auto;
55 | // height:100%;
56 | }
57 | }
--------------------------------------------------------------------------------
/src/components/sceneviewer/ModifyDataSource/index.jsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable jsx-a11y/anchor-is-valid */
2 | import React, { useState } from 'react';
3 | import { Button } from 'antd';
4 | import modifyDataSourceIcon from './images/icon_search2-01.png';
5 | import modifyDataSourceIcon1 from './images/icon_search1-01.png';
6 | import ChangeDataSource from './ModifyDataSourcePanle';
7 | import styles from './index.css';
8 |
9 | const ModifyDataSource = () => {
10 | const [panalState, setPanalState] = useState(false);
11 |
12 | function btnOnClick() {
13 | setPanalState(!panalState)
14 | }
15 |
16 | return (
17 |
18 |
31 |
32 |
33 | );
34 | };
35 |
36 | export default ModifyDataSource;
37 |
--------------------------------------------------------------------------------
/.umirc.js:
--------------------------------------------------------------------------------
1 | var fs = require('fs');
2 |
3 | const publicUrl = './public';
4 |
5 | // ref: https://umijs.org/config/
6 | export default {
7 | base: '/',
8 | publicPath: '/public/',
9 | targets: {
10 | ie: 11,
11 | },
12 | exportStatic: {
13 | htmlSuffix: true,
14 | dynamicRoot: true,
15 | },
16 | plugins: [
17 | // new InterpolateHtmlPlugin(HtmlWebpackPlugin, {
18 | // PUBLIC_URL: publicUrl,
19 | // // You can pass any key-value pairs, this was just an example.
20 | // // WHATEVER: 42 will replace %WHATEVER% with 42 in index.html.
21 | // }),
22 | // ref: https://umijs.org/plugin/umi-plugin-react.html
23 | [
24 | 'umi-plugin-react',
25 | {
26 | antd: true,
27 | dva: true,
28 | dynamicImport: false,
29 | title: 'umitest',
30 | library: 'react',
31 | pwa: false,
32 | hd: false,
33 | dll: false,
34 | routes: {
35 | exclude: [
36 | /models\//,
37 | /services\//,
38 | /components\//,
39 | /constants\//,
40 | /middleware\//,
41 | /utils\//,
42 | ],
43 | },
44 | hardSource: false,
45 | },
46 | ],
47 | ]
48 | };
49 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/Layerlist/index.jsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable jsx-a11y/anchor-is-valid */
2 | import React, { useState } from 'react';
3 | import { connect } from 'dva';
4 | import { Button } from 'antd';
5 | import sunImageIcon from './images/layers1.png';
6 | import sunImageIcon1 from './images/layers2.png';
7 | import LightShadowPanle from './components/lightShadowPanle/index';
8 | import styles from './index.less';
9 |
10 | const Layerlist = ({ dispatch }) => {
11 | const [visible, setVisible] = useState(false);
12 |
13 | // 按钮被点击
14 | function btnOnClick() {
15 | setVisible(!visible)
16 | }
17 |
18 | // 关掉面板
19 | function closePanle() {
20 | setVisible(false);
21 | }
22 |
23 | return (
24 |
25 |
30 |
31 |
32 | );
33 | }
34 |
35 | export default connect(() => {
36 | return {
37 |
38 | };
39 | })(Layerlist);
40 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/LightShadow/index.jsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable jsx-a11y/anchor-is-valid */
2 | import React, { useState } from 'react';
3 | import { connect } from 'dva';
4 | import { Button } from 'antd';
5 | import sunImageIcon from './images/rzfx.png';
6 | import sunImageIcon1 from './images/rzfx1.png';
7 | import LightShadowPanle from './components/lightShadowPanle/index';
8 | import styles from './index.less';
9 |
10 | const LightShadow = ({ dispatch }) => {
11 | const [visible, setVisible] = useState(false);
12 |
13 | // 按钮被点击
14 | function btnOnClick() {
15 | setVisible(!visible)
16 | }
17 |
18 | // 关掉面板
19 | function closePanle() {
20 | setVisible(false);
21 | }
22 |
23 | return (
24 |
25 |
30 |
31 |
32 | );
33 | }
34 |
35 | export default connect(() => {
36 | return {
37 |
38 | };
39 | })(LightShadow);
40 |
--------------------------------------------------------------------------------
/src/components/timesliderlayer/TimeSliderLayer.less:
--------------------------------------------------------------------------------
1 | .wrap {
2 | z-index: 2;
3 | background: #aaa;
4 | position: absolute;
5 | margin-left: -390px;
6 | bottom: 10px;
7 | left: 50%;
8 | height: 70px;
9 | width: 780px;
10 | display: block;
11 | box-shadow: 1px 2px 1px rgba(0, 0, 0, 0.15);
12 | // border: 1px solid #eee;
13 | border-radius: 4px;
14 | .layerSelect{
15 | width: 150px;
16 | float: left;
17 | color: '#1870ff';
18 | margin-top: 20px;
19 | .ant-select-selection{
20 | border: none !important;
21 | }
22 | }
23 | .controlBar {
24 | float: left;
25 | width: 50px;
26 | line-height: 70px;
27 | height: 70px;
28 | text-align: center;
29 | font-size: 22px;
30 | color: #fff;
31 | &:hover{
32 | color: #1870ff;
33 | }
34 | }
35 | .closeBar{
36 | float: right;
37 | width: 50px;
38 | line-height: 70px;
39 | height: 70px;
40 | text-align: center;
41 | font-size:18px;
42 | color: #fff;
43 | &:hover{
44 | color: #1870ff;
45 | }
46 | }
47 | .sliderbardiv{
48 | float: left;
49 | width: 520px;
50 | /* height: 70px; */
51 | padding-left: 10px;
52 | padding-right: 30px;
53 | /* line-height: 70px; */
54 | margin-top: 15px;
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/components/search/ClassificationQuery.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react';
2 | import { connect } from 'dva';
3 | import styles from './ClassificationQuery.css';
4 |
5 | class Classquery extends Component {
6 | constructor(props) {
7 | super(props);
8 | this.state = {};
9 | }
10 |
11 | selectGroup(item) {
12 | this.props.onItemClick(item);
13 | }
14 |
15 | renderClassitems() {
16 | return window.classfg.data.map((d, index) => {
17 | return (
18 | {
22 | this.selectGroup(d);
23 | }}
24 | >
25 |
26 | {d.alias}
27 |
28 | );
29 | });
30 | }
31 |
32 | render() {
33 | return (
34 |
40 |
{this.renderClassitems()}
41 |
42 | );
43 | }
44 | }
45 |
46 | export default connect(({ search }) => {
47 | return {
48 | search,
49 | };
50 | })(Classquery);
51 |
--------------------------------------------------------------------------------
/src/services/baiduAPI/driveline.js:
--------------------------------------------------------------------------------
1 | import {request,requestJsonp} from '../../utils/request';
2 |
3 | const URL_DRIVE_LINE = 'http://api.tianditu.gov.cn/drive';
4 |
5 | /**
6 | * 关于style: 默认0 (0:最快路线,1:最短路线,2:避开高速,3:步行)
7 | * @param {*} startposition
8 | * @param {*} endposition
9 | */
10 | export function planDriveLine(startposition, endposition) {
11 | let queryUrl = window.searchConfig.driveApiUrl;
12 | queryUrl = queryUrl.replace('{origin}', startposition.split(',')[1]+','+startposition.split(',')[0]);
13 | queryUrl = queryUrl.replace('{destination}', endposition.split(',')[1]+','+endposition.split(',')[0]);
14 |
15 | return requestJsonp(`${queryUrl}`, {
16 | method: 'GET',
17 | headers:{
18 | Accept: 'application/json'
19 | },
20 | });
21 | }
22 |
23 | // export function planDriveLine(startposition, endposition) {
24 | // const p = new URLSearchParams();
25 | // p.append('type', 'search');
26 | // p.append('tk', window.geosearchcfg.tianditu.key);
27 | // p.append(
28 | // 'postStr',
29 | // JSON.stringify({
30 | // orig: startposition,
31 | // dest: endposition,
32 | // style: '0',
33 | // }),
34 | // );
35 |
36 | // return requestText(`${URL_DRIVE_LINE}?${p.toString()}`, {
37 | // method: 'GET',
38 | // handleAs: 'text',
39 | // });
40 | // }
41 |
--------------------------------------------------------------------------------
/src/components/search/routes/TerminalSelector.css:
--------------------------------------------------------------------------------
1 | .box {
2 | -webkit-transition: max-height 1s ease-in;
3 | transition: max-height 1s ease-in;
4 | overflow: hidden;
5 | flex: none;
6 | background-color: #fff;
7 | width: 395px;
8 | pointer-events: all;
9 | box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 8px;
10 | }
11 |
12 | .searchbox {
13 | float: left;
14 | height: auto;
15 | width: 361px;
16 | position: relative;
17 | box-sizing: border-box;
18 | display: flex;
19 | flex-direction: row;
20 | }
21 |
22 | .revertbox {
23 | padding: 33px 23px;
24 | flex: none;
25 | cursor: pointer;
26 | display: flex;
27 | align-items: center;
28 | justify-content: center;
29 | }
30 |
31 | .inputbox {
32 | flex: auto;
33 | height: 100%;
34 | display: flex;
35 | flex-direction: column;
36 | }
37 |
38 | .routeinputbox {
39 | display: flex;
40 | flex-direction: row;
41 | height: 48px;
42 | align-items: center;
43 | }
44 |
45 | .routeinputicon {
46 | }
47 |
48 | .routeinput {
49 | height: 100%;
50 | width: 100%;
51 | padding: 10px 0;
52 | font-size: 14px;
53 | border: none;
54 | line-height: 20px;
55 | margin-left: 12px;
56 | margin-right: 27px;
57 | background: transparent;
58 | /*color: rgba(255, 255, 255, 0.65)*/
59 | }
60 |
61 | .routeinput:focus {
62 | border-color: none;
63 | box-shadow: none;
64 | }
65 |
--------------------------------------------------------------------------------
/src/utils/common.js:
--------------------------------------------------------------------------------
1 | //pensiveant:数据选择依赖
2 |
3 | export default {
4 | /**
5 | * 等分数组
6 | * @param {*} array 数组对象
7 | * @param {*} size 分组长度
8 | */
9 | sliceArrayBySize(array, size) {
10 | const result = [];
11 | for (var x = 0; x < Math.ceil(array.length / size); x++) {
12 | var start = x * size;
13 | var end = start + size;
14 | result.push(array.slice(start, end));
15 | }
16 | return result;
17 | },
18 | /**
19 | * 获取json对象的key数组。
20 | * @param {*} obj
21 | */
22 | getJsonobjKeys(obj) {
23 | return Object.keys(obj);
24 | },
25 | /**
26 | * 删除数组指定项
27 | * @param {*} arr
28 | * @param {*} item
29 | */
30 | deleteArrItem(arr, item) {
31 | if (arr.includes(item)) {
32 | arr.splice(arr.indexOf(item), 1);
33 | }
34 | return arr;
35 | },
36 | /**
37 | * 数组去重
38 | * @param {*} arr 要去重的数组
39 | */
40 | arrUnique(arr) {
41 | let newArr = new Set(arr);
42 | return [...newArr];
43 | },
44 | /**
45 | * 颜色RGB对象转Hex
46 | * @param {*} colorRGB example {r:110,g:110,b:110}
47 | */
48 | colorRGB2Hex(colorRGB) {
49 | var r = parseInt(colorRGB.r);
50 | var g = parseInt(colorRGB.g);
51 | var b = parseInt(colorRGB.b);
52 | var hex = "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);
53 | return hex;
54 | }
55 | };
56 |
--------------------------------------------------------------------------------
/src/services/portal4ags/group/totalGroup.js:
--------------------------------------------------------------------------------
1 | // import request from '../../utils/request';
2 | import jQuery from 'jquery';
3 |
4 | export default function getTotalGroup(dataObj) {
5 | // https://feng.arcgisonline.cn/portal/sharing/rest/community/groups?num=100&start=0&sortField=title&sortOrder=asc&q=orgid%3A0123456789ABCDEF&f=json&token=vHjRtx-NwGVyHtDM3Q5Q4I2L-XS_tdSntkx_9mr_23PleKkMio9a2JkCcsrQ5q4kvDLN_4dcMZzkF_l4RWeL08fsC7eVZYIGW0OsErr5k0RxJ0uHGwKQA9RWR0DJq-t9_bHf_BZnIm9G5dTks1lU4-E2jO4ca_RBkzLNIFkciTbLSpWB7aSocpQKnt63rAYN-3QDUO80yHpyFArilCIXKA..
6 |
7 | // https://feng.arcgisonline.cn/portal/sharing/rest/community/groups?
8 | // f=json&num=100&start=0&sortField=title&sortOrder=asc
9 | // &q=orgid%3A0123456789ABCDEF&token=vHjRtx-NwGVyHtDM3Q5Q4I2L-XS_tdSntkx_9mr_23PleKkMio9a2JkCcsrQ5q4kvDLN_4dcMZzkF_l4RWeL08fsC7eVZYIGW0OsErr5k0RxJ0uHGwKQA9RWR0DJq-t9_bHf_BZnIm9G5dTks1lU4-E2jO4ca_RBkzLNIFkciTbLSpWB7aSocpQKnt63rAYN-3QDUO80yHpyFArilCIXKA..
10 |
11 | const requestUrl =
12 | 'https://' +
13 | dataObj.domainName +
14 | '/' +
15 | dataObj.webAdaptorName +
16 | '/sharing/rest/community/groups?' +
17 | 'f=json&num=100&start=0&sortField=title&sortOrder=asc' +
18 | '&q=orgid%3A0123456789ABCDEF' +
19 | '&token=' +
20 | dataObj.token;
21 | return jQuery.ajax({
22 | type: 'GET',
23 | url: requestUrl,
24 | dataType: 'json' //dataType不能少
25 | });
26 | }
27 |
--------------------------------------------------------------------------------
/src/services/portal4ags/item/totalFeatureLayerItem.js:
--------------------------------------------------------------------------------
1 | // import request from '../../utils/request';
2 | import jQuery from 'jquery';
3 |
4 | export default function getTotalFeatureLayerItem(dataObj) {
5 | // type:'Web Scene' AND owner:Product 对
6 | // type:'Web Scene' and owner:Product 不对
7 | // type:'Web Scene' AND owner:'Product' 不对
8 | // asc 正序
9 | // desc 倒序
10 | // https://feng.arcgisonline.cn/portal/sharing/rest/search?f=json&num=100&start=1&sortField=type&sortOrder=asc&q=modified%3A%5B0000001527724800000%20TO%200000001557220958000%5D%20AND%20accountid%3A0123456789ABCDEF&t=content&f=json&token=mMmBBBLGUPLXy8AZ3kjJySN8tuRBpbKCqo3l-kzYmJWq7Eej3DUWhhFkhLiGxfmhE8ZnskzHCiQFXd3BANmscV5-zF2agKOp19ljxti7jVYCHrTW_opkwmAvbflisbZe-G-AAbz2-uSjGTAwdoYC9Ig6VS-IzBl8BbmGxMtomSTmFlW0HvYRNU65bYyUc85iCVNbgyfzxstHGGTypff0-Q..
11 | // http://esrichina3d.arcgisonline.cn/portal/sharing/search?f=json&q=type%3A%27Web+Scene%27+AND+owner%3AProduct&bbox=&sortField=&sortOrder=
12 |
13 | const requestUrl = "http://esrichina3d.arcgisonline.cn/portal/sharing/search?f=json&" +
14 | "num=100&start=1&sortField=modified&sortOrder=desc&" +
15 | "q=owner:" + dataObj.owner + " (type:('Feature Collection' OR 'Feature Service' OR 'Stream Service' OR 'WFS') -typekeywords:'Table')";
16 | return jQuery.ajax({
17 | type: 'GET',
18 | url: requestUrl,
19 | dataType: 'json' //dataType不能少
20 | });
21 | }
--------------------------------------------------------------------------------
/src/services/search.js:
--------------------------------------------------------------------------------
1 | import request from '../utils/request';
2 |
3 | import BatchSearch from '../utils/batch-search';
4 | // import { IDENTIFY_TOLERENCE } from '../constants/search';
5 |
6 | const URL_SEARCH_SOLR =
7 | 'http://www.mapjs.com.cn/map/search/solr?q=%E5%8D%97%E4%BA%AC%E5%B8%82%E6%94%BF%E5%BA%9C&start=0&rows=5&wt=json';
8 |
9 | export function searchsolr(key, start) {
10 | const param = new URLSearchParams();
11 | param.append('q', encodeURIComponent(key));
12 | param.append('start', start);
13 | param.append('rows', 5);
14 | param.append('wt', 'json');
15 |
16 | return request(URL_SEARCH_SOLR, {
17 | method: 'GET',
18 | params: param,
19 | });
20 | }
21 |
22 | /**
23 | * 根据关键字查询POI兴趣点
24 | * @param {string} key 关键字
25 | */
26 | export async function searchPoi(key) {
27 | return BatchSearch.instance().search(key);
28 | }
29 |
30 | export async function searchCategory(keyword, bound) {
31 | return BatchSearch.instance().searchCategory(keyword, bound);
32 | }
33 |
34 | /**
35 | * 查询指定的位置周边的POI要素
36 | * @param {__esri.Point} point 指定的位置
37 | * @param {number} buffer 缓冲区范围
38 | */
39 | export async function searchSurround(point, keyword, tolerance, bound) {
40 | return BatchSearch.instance().identify(point, keyword, tolerance, bound);
41 | }
42 |
43 | export async function searchSurroundCat(point, keyword, tolerance, bound) {
44 | return BatchSearch.instance().identify(point, keyword, tolerance, bound);
45 | }
46 |
--------------------------------------------------------------------------------
/src/components/widgets/Legend.jsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 二维长度测量
3 | * @author lee
4 | */
5 | import { useRef, useState, useEffect } from 'react';
6 | import { Spin, Icon } from 'antd';
7 | import * as jsapi from '../../utils/jsapi';
8 |
9 | let widget;
10 |
11 | const Legendlist = ({ view }) => {
12 | const domRef = useRef(null);
13 | const [loading, setLoading] = useState(true);
14 |
15 | useEffect(() => {
16 | if (domRef.current) {
17 | jsapi.load(['esri/widgets/Legend']).then(([Legend]) => {
18 | setLoading(false);
19 |
20 | const div = document.createElement('div');
21 | // 调用jsapi的图例功能
22 | widget = new Legend({
23 | view,
24 | container: div,
25 | });
26 | domRef.current.appendChild(div);
27 | });
28 | }
29 |
30 | return () => {
31 | if (widget) {
32 | // 如果widget存在,则删除该widget
33 | widget.destroy();
34 | }
35 | };
36 | }, []);
37 |
38 | return (
39 |
40 |
41 | {loading && (
42 |
49 | }
53 | />
54 |
55 | )}
56 |
57 | );
58 | };
59 |
60 | export default Legendlist;
61 |
--------------------------------------------------------------------------------
/src/middleware/arcgis/sceneview/arcgis-weatherEffects.js:
--------------------------------------------------------------------------------
1 | import jQuery from 'jquery';
2 |
3 | import {
4 | ACTION_STARTHANDLEWEATHEREFFECTS_3D,
5 | } from '../../../constants/action-types';
6 |
7 | function weatherEffects(opts = {}) {
8 | // Detect if 'createLogger' was passed directly to 'applyMiddleware'.
9 | if (opts.getState && opts.dispatch) {
10 | return () => (next) => (action) => next(action);
11 | }
12 |
13 | return (store) => (next) => (action) => {
14 | switch (action.type) {
15 | case ACTION_STARTHANDLEWEATHEREFFECTS_3D: {
16 | const param = action.payload;
17 | console.log('开始处理天气特效,传来的参数是:' + param.weatherType);
18 | if (param.weatherType === 'rain') {
19 | jQuery('.snow-container').hide();
20 | jQuery('#rain').show();
21 | } else if (param.weatherType === 'snow') {
22 | jQuery('#rain').hide();
23 | jQuery('.snow-container').show();
24 | } else if (param.weatherType === 'rainAndSnow') {
25 | jQuery('#rain').show();
26 | jQuery('.snow-container').show();
27 | } else if (param.weatherType === 'sunnyDay') {
28 | jQuery('.snow-container').hide();
29 | jQuery('#rain').hide();
30 | } else {
31 | console.log('天气特效没有操作,请检查');
32 | }
33 | break;
34 | }
35 |
36 | default: {
37 | next(action);
38 | break;
39 | }
40 | }
41 | return Promise.resolve();
42 | };
43 | }
44 |
45 | export { weatherEffects };
46 |
--------------------------------------------------------------------------------
/src/components/mapviewer/viewInfo/index.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | position: fixed;
3 | bottom: 0;
4 | width: 100%;
5 | display: flex;
6 | flex-direction: row;
7 | justify-content: space-between;
8 | z-index: 1;
9 | }
10 |
11 | .left {
12 | flex: none;
13 | display: flex;
14 | flex-direction: row;
15 | }
16 |
17 | .left > span:nth-child(1) {
18 | background-color: rgba(0, 0, 0, 0.5);
19 | padding: 0 20px;
20 | width: 300px;
21 | color: white;
22 | }
23 |
24 | .left > span:nth-child(1) > span {
25 | display: inline-block;
26 | width: 100px;
27 | }
28 |
29 | .leftarrow {
30 | font-size: 0;
31 | line-height: 0;
32 | border-width: 10px;
33 | border-color: rgba(0, 0, 0, 0.5);
34 | border-right-width: 0;
35 | border-style: dashed;
36 | border-left-style: solid;
37 | border-top-color: transparent;
38 | border-bottom-color: transparent;
39 | }
40 |
41 | .right {
42 | flex: none;
43 | display: flex;
44 | flex-direction: row;
45 | }
46 |
47 | .right > span:nth-child(2) {
48 | background-color: rgba(0, 0, 0, 0.5);
49 | padding: 0 20px;
50 | width: 300px;
51 | color: white;
52 | }
53 |
54 | .right > span:nth-child(2) > span {
55 | display: inline-block;
56 | width: 130px;
57 | }
58 |
59 | .rightarrow {
60 | font-size: 0;
61 | line-height: 0;
62 | border-width: 10px;
63 | border-color: rgba(0, 0, 0, 0.5);
64 | border-left-width: 0;
65 | border-style: dashed;
66 | border-right-style: solid;
67 | border-top-color: transparent;
68 | border-bottom-color: transparent;
69 | }
70 |
--------------------------------------------------------------------------------
/src/models/bookmark.js:
--------------------------------------------------------------------------------
1 | /*
2 | * 书签组件的model层
3 | * author:pensiveant
4 | */
5 |
6 | import {
7 | ACTION_ADDBOOKMARK_2D,
8 | ACTION_GOTOBOOKMARK_2D,
9 | ACTION_DELETBOOKMARK_2D,
10 | ACTION_DELETTHISBOOKMARK_2D,
11 | ACTION_EDITBOOKMARK_2D,
12 | } from '../constants/action-types';
13 |
14 | export default {
15 | namespace: 'bookmark',
16 | state: {
17 | bookflags: false, //是否显示书签组件
18 | bookmarks: [], // 所有书签数据数组
19 | bookname: null, //
20 | },
21 | subscriptions:{
22 |
23 | },
24 | effects:{
25 | *addBookmark({ payload }, { put }) {
26 | yield put({ type: ACTION_ADDBOOKMARK_2D, payload });
27 | },
28 | *editBookmark({ payload }, { put }) {
29 | yield put({ type: ACTION_EDITBOOKMARK_2D, payload });
30 | },
31 | *deletBookmark({ payload }, { put }) {
32 | yield put({ type: ACTION_DELETBOOKMARK_2D, payload });
33 | },
34 | *deletthisBookmark({ payload }, { put }) {
35 | yield put({ type: ACTION_DELETTHISBOOKMARK_2D, payload });
36 | },
37 | *gotoBookmark({ payload }, { put }) {
38 | yield put({ type: ACTION_GOTOBOOKMARK_2D, payload });
39 | },
40 | },
41 | reducers:{
42 | bookmarkChangeState(state, action) {
43 | return { ...state, bookflags: action.payload };
44 | },
45 | updateBookmarks(state, action) {
46 | return { ...state, bookmarks: action.payload };
47 | },
48 | }
49 | }
--------------------------------------------------------------------------------
/src/components/widgets/MeasureArea2D.jsx:
--------------------------------------------------------------------------------
1 | import { useRef, useState, useEffect } from 'react';
2 | import { Spin, Icon } from 'antd';
3 | import * as jsapi from '../../utils/jsapi';
4 |
5 | let widget;
6 | /**
7 | * 二维面积测量
8 | * @author lee
9 | */
10 | const MeasureArea2D = ({ view }) => {
11 | const domRef = useRef(null);
12 | const [loading, setLoading] = useState(true);
13 |
14 | useEffect(() => {
15 | if (domRef.current) {
16 | jsapi.load(['esri/widgets/AreaMeasurement2D']).then(([AreaMeasurement2D]) => {
17 | setLoading(false);
18 |
19 | const div = document.createElement('div');
20 | // 调用jsapi的二维测面微件
21 | widget = new AreaMeasurement2D({
22 | view,
23 | container: div,
24 | });
25 | domRef.current.appendChild(div);
26 | });
27 | }
28 |
29 | return () => {
30 | if (widget) {
31 | // 如果widget存在,则删除该widget
32 | widget.destroy();
33 | }
34 | };
35 | }, []);
36 |
37 | return (
38 |
39 |
40 | {loading && (
41 |
48 | }
52 | />
53 |
54 | )}
55 |
56 | );
57 | };
58 |
59 | export default MeasureArea2D;
60 |
--------------------------------------------------------------------------------
/src/components/mapviewer/basemap/basemapPanel/index.jsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable jsx-a11y/alt-text */
2 | /**
3 | * 底图选择框组件
4 | * @author lee
5 | */
6 |
7 | import React from 'react';
8 | import { Row, Col } from 'antd';
9 | import styles from './index.less';
10 |
11 | const BaseMapPanel = props => {
12 | function switchBmap(e) {
13 | const view = window.agsGlobal.view;
14 | const itemId = e.target.dataset.itemid;
15 | // 通过webmap的id切换底图
16 | window.GeomapUtils.view.map2d.switchBaseMapByWebmapId(view, itemId);
17 | // 调用父组件的设置图片地址功能
18 | props.setBmapIcon(e.target.src);
19 | // 调用父组件的隐藏功能
20 | props.hide();
21 | }
22 | // 根据配置文件渲染可选择的底图库
23 | function renderBmapList() {
24 | return window.basemapConfig.map(item => {
25 | return (
26 |
27 |
28 |

34 |
35 | {item.title}
36 |
37 |
38 |
39 | );
40 | });
41 | }
42 |
43 | return (
44 |
48 |
49 | {renderBmapList()}{' '}
50 |
51 |
52 | );
53 | };
54 |
55 | export default BaseMapPanel;
56 |
--------------------------------------------------------------------------------
/src/components/widgets/MeasureLine2D.jsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 二维长度测量
3 | * @author lee
4 | */
5 | import { useRef, useState, useEffect } from 'react';
6 | import { Spin, Icon } from 'antd';
7 | import * as jsapi from '../../utils/jsapi';
8 |
9 | let widget;
10 |
11 | const MeasureLine2D = ({ view }) => {
12 | const domRef = useRef(null);
13 | const [loading, setLoading] = useState(true);
14 |
15 | useEffect(() => {
16 | if (domRef.current) {
17 | jsapi.load(['esri/widgets/DistanceMeasurement2D']).then(([DistanceMeasurement2D]) => {
18 | setLoading(false);
19 |
20 | const div = document.createElement('div');
21 | // 调用jsapi的二维测距微件
22 | widget = new DistanceMeasurement2D({
23 | view,
24 | container: div,
25 | });
26 | domRef.current.appendChild(div);
27 | });
28 | }
29 |
30 | return () => {
31 | if (widget) {
32 | // 如果widget存在,则删除该widget
33 | widget.destroy();
34 | }
35 | };
36 | }, []);
37 |
38 | return (
39 |
40 |
41 | {loading && (
42 |
49 | }
53 | />
54 |
55 | )}
56 |
57 | );
58 | };
59 |
60 | export default MeasureLine2D;
61 |
--------------------------------------------------------------------------------
/src/components/widgets/PrintMap2D.jsx:
--------------------------------------------------------------------------------
1 | import { useRef, useState, useEffect } from 'react';
2 | import { Spin, Icon } from 'antd';
3 | import * as jsapi from '../../utils/jsapi';
4 |
5 | let widget;
6 | /**
7 | * 二维打印微件
8 | * @author liugh
9 | */
10 | const PrintMap2D = ({ view }) => {
11 | const domRef = useRef(null);
12 | const [loading, setLoading] = useState(true);
13 |
14 | useEffect(() => {
15 | if (domRef.current) {
16 | jsapi.load(['esri/widgets/Print']).then(([Print]) => {
17 | setLoading(false);
18 |
19 | const div = document.createElement('div');
20 | // 调用jsapi的二维打印微件
21 | widget = new Print({
22 | view,
23 | container: div,
24 | printServiceUrl: window.appcfg.printService,
25 | });
26 | domRef.current.appendChild(div);
27 | });
28 | }
29 |
30 | return () => {
31 | if (widget) {
32 | // 如果widget存在,则删除该widget
33 | widget.destroy();
34 | }
35 | };
36 | }, []);
37 |
38 | return (
39 |
40 |
41 | {loading && (
42 |
49 | }
53 | />
54 |
55 | )}
56 |
57 | );
58 | };
59 |
60 | export default PrintMap2D;
61 |
--------------------------------------------------------------------------------
/src/services/baiduAPI/searchpoi.js:
--------------------------------------------------------------------------------
1 | import {request,requestJsonp} from '../../utils/request';
2 |
3 |
4 | export function queryBusStation(key, start) {
5 | let queryUrl = window.searchConfig.addressTipApiUrl;
6 | queryUrl = queryUrl.replace('{keyword}', key);
7 |
8 | return requestJsonp(`${queryUrl}`, {
9 | method: 'GET',
10 | // mode: 'no-cors',
11 | // mode: 'cors',
12 | headers:{
13 | Accept: 'application/json'
14 | },
15 | });
16 | }
17 |
18 | export function queryPoi(key, level, bound, start) {
19 | const p = new URLSearchParams();
20 | p.append('type', 'query');
21 | p.append('tk', window.geosearchcfg.tianditu.key);
22 | p.append(
23 | 'postStr',
24 | JSON.stringify({
25 | keyWord: key,
26 | mapBound: bound,
27 | queryType: '7',
28 | level: `${level}`,
29 | count: '1000',
30 | start: `${start}`,
31 | })
32 | );
33 |
34 | return request(`${URL_QUERY}?${p.toString()}`, {
35 | method: 'GET',
36 | });
37 | }
38 |
39 | export function queryNearbyPoi(key, point, level, bound, start) {
40 | const p = new URLSearchParams();
41 | p.append('type', 'query');
42 | p.append('tk', window.geosearchcfg.tianditu.key);
43 | p.append(
44 | 'postStr',
45 | JSON.stringify({
46 | keyWord: key,
47 | mapBound: bound,
48 | queryType: '3',
49 | queryRadius: '3000',
50 | pointLonlat: point,
51 | level: `${level}`,
52 | count: '1000',
53 | start: `${start}`,
54 | })
55 | );
56 |
57 | return request(`${URL_QUERY}?${p.toString()}`, {
58 | method: 'GET',
59 | });
60 | }
--------------------------------------------------------------------------------
/src/components/mapviewer/compass/index.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 | import { connect } from 'dva';
3 | import * as jsapi from '../../../utils/jsapi';
4 | import styles from './index.css';
5 |
6 | function toRotationTransform(orientation) {
7 | return {
8 | display: 'inline-block',
9 | fontSize: '24px',
10 | transform: `rotateZ(${orientation.z}deg)`,
11 | };
12 | }
13 | /**
14 | * 罗盘微件
15 | * @author lee
16 | */
17 | const Compass = props => {
18 | const [vm,setVm] = useState(null);
19 | const [orientation, setOrientation] = useState({
20 | z: 0,
21 | });
22 |
23 | useEffect(() => {
24 | const timer = setInterval(() => {
25 | if (window.agsGlobal.view) {
26 | clearInterval(timer);
27 | createWidget(window.agsGlobal.view);
28 | }
29 | }, 300);
30 | }, []);
31 |
32 | const createWidget = view => {
33 | jsapi.load(['esri/widgets/Compass/CompassViewModel']).then(([CompassViewModel]) => {
34 | const vmstate = new CompassViewModel();
35 | vmstate.view = view;
36 | vmstate.watch('orientation', orientation => {
37 | setOrientation(orientation);
38 | });
39 | setVm(vmstate);
40 | });
41 | };
42 |
43 | const reset = () => {
44 | vm.reset();
45 | };
46 |
47 | return (
48 |
53 | );
54 | };
55 |
56 | export default connect(({ agsmap }) => {
57 | return { agsmap };
58 | })(Compass);
59 |
--------------------------------------------------------------------------------
/src/components/mapviewer/bookmark/index.css:
--------------------------------------------------------------------------------
1 | .wrapClassName {
2 | pointer-events: none;
3 | }
4 | .addBtn {
5 | width: 180;
6 | border: 'none';
7 | text-align: 'left';
8 | margin-right: '12px';
9 | background: #001529;
10 | color: #fff;
11 | }
12 | .modal {
13 | position: fixed;
14 | right: 85px;
15 | top: 116px;
16 | /*bottom: 25px;*/
17 | pointer-events: all;
18 | overflow: hidden;
19 | border-radius: 4px 4px 0 0;
20 | width: 360px;
21 | max-height: 840px;
22 | background: #fff;
23 | z-index: 5;
24 | display: flex;
25 | /* border: 1px solid #1870ff; */
26 | box-shadow: 1px 2px 1px rgba(0,0,0,.15);
27 | }
28 | .modalbody {
29 | padding: 10px 0px 10px 10px;
30 | text-align: center;
31 | background-color: #fff;
32 | color: #000;
33 | min-height: 245px;
34 | max-height: 750px;
35 | overflow: auto;
36 | }
37 | .listdiv {
38 | min-height: 245px;
39 | overflow: auto;
40 | max-height: 745px;
41 | }
42 | .wrapClassName {
43 | pointer-events: none;
44 | }
45 |
46 | .title {
47 | font-size: 15px;
48 | width: 100%;
49 | line-height: 20px;
50 | border-radius: 4px 4px 0 0;
51 | padding: 8px 12px;
52 | color: #fff;
53 | background: #1870ff;
54 | border: none;
55 | }
56 | .close {
57 | float: right;
58 | font-size: 16px;
59 | color: #ffffff;
60 | }
61 | .btnDiv {
62 | text-align: center;
63 | padding-bottom: 10px;
64 | background-color: #fff;
65 | }
66 | .listbtn {
67 | width: 250px;
68 | text-align: left;
69 | margin-right: 2px;
70 | background: transparent;
71 | border: none;
72 | }
73 | .editbtn {
74 | border: 'none';
75 | }
76 |
77 | .labelmargin{
78 | margin-bottom: 10px;
79 | }
80 |
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/clear.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/pages/document.ejs:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | ARCGIS GEOMAP
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/clear.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/home/index.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 | import { Icon } from 'antd';
3 | import classnames from 'classnames';
4 |
5 | import arcgis from '../../../utils/arcgis';
6 | import * as jsapi from '../../../utils/jsapi';
7 |
8 | import styles from './index.css';
9 |
10 | export default () => {
11 | const [loading, setLoading] = useState(true);
12 | const [vm, setVm] = useState(null);
13 |
14 | useEffect(() => {
15 | jsapi.load(['esri/widgets/Home/HomeViewModel']).then(([HomeViewModel]) => {
16 | if (arcgis.isViewReady()) {
17 | const vm = new HomeViewModel({
18 | view: window.agsGlobal.view,
19 | });
20 | setVm(vm);
21 | setLoading(false);
22 | } else {
23 | const timer = setInterval(() => {
24 | if (arcgis.isViewReady()) {
25 | clearInterval(timer);
26 | const vm = new HomeViewModel({
27 | view: window.agsGlobal.view,
28 | });
29 | setVm(vm);
30 | setLoading(false);
31 | }
32 | }, 300);
33 | }
34 | });
35 | }, []);
36 |
37 | function reset() {
38 | if (!vm || vm.state !== 'ready') {
39 | return;
40 | }
41 |
42 | vm.go(vm.view.map.initialViewProperties.viewpoint);
43 | }
44 |
45 | return (
46 |
47 |
54 | {loading ? : }
55 |
56 |
57 | );
58 | };
59 |
--------------------------------------------------------------------------------
/src/utils/env.js:
--------------------------------------------------------------------------------
1 | export const AppConfig = window.appcfg;
2 |
3 | export const Portal = AppConfig.portal;
4 | export const AppProxy = AppConfig.proxy;
5 | export const WebmapID = AppConfig.webMapId;
6 | export const WebsceneID = AppConfig.webSceneId;
7 |
8 | // --- Portal Auth
9 | export const SignInUrl = AppConfig.signin;
10 | export const ClientID = AppConfig.clientId;
11 | export const ClientSecret = AppConfig.clientSecret;
12 | // --- END
13 |
14 | export const InitialExtent = AppConfig.initialExtent;
15 |
16 | export const SplitWebmap = AppConfig.websplitMapId;
17 | export const SplitItem1 = AppConfig.splitItemIdone;
18 | export const SplitItem2 = AppConfig.splitItemIdtwo;
19 |
20 | export const MultiDateItem1 = AppConfig.multidateItemone;
21 | export const MultiDateItem2 = AppConfig.multidateItemtwo;
22 | export const MultiDateItem3 = AppConfig.multidateItemthree;
23 | export const MultiDateItem4 = AppConfig.multidateItemfour;
24 | export const MultiDateItem5 = AppConfig.multidateItemfive;
25 |
26 | export default {
27 | getParamAgs() {
28 | return window.agsGlobal;
29 | },
30 | getDomainName() {
31 | return window.appcfg.domainName4datasource;
32 | },
33 | getWebAdaptorName() {
34 | return window.appcfg.webAdaptorName4datasource;
35 | },
36 | getUsername4searchItems() {
37 | return window.appcfg.username4searchItems4datasource;
38 | },
39 | getPortal4datasource() {
40 | // http://esrichina3d.arcgisonline.cn/portal/
41 | const portalUrl = window.appcfg.protocolName4datasource + '://' + window.appcfg.domainName4datasource + '/' + window.appcfg.webAdaptorName4datasource + '/';
42 | return portalUrl;
43 | },
44 | }
--------------------------------------------------------------------------------
/public/libs/poltmodules/SwallowTailArrow.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Created by chenzpa on 2015/10/30.
3 | */
4 | define([
5 | "dojo/_base/declare",
6 | 'modules/GeneralArrow'
7 | ], function (declare,GeneralArrow) {
8 | return declare([GeneralArrow], {
9 | af:0.1,
10 | ag:1,
11 | constructor: function (pts) {
12 | },
13 | getFgc :function(){
14 | return 2;
15 | },
16 | draw:function(pnts){
17 | //只有最少两个点才能绘制
18 | if(!pnts|| pnts.length < 2)
19 | return;
20 | var rings = [];
21 | var tailPnts = this.fz(pnts);
22 | var headPnts = this.fx(pnts, tailPnts[0], tailPnts[2]);
23 | var neckLeft = headPnts[0];
24 | var neckRight = headPnts[4];
25 | var bodyPnts = this.fy(pnts, neckLeft, neckRight, this.af);
26 | var count = bodyPnts.length;
27 | var leftPnts = [tailPnts[0]].concat(bodyPnts.slice(0, (count / 2)));
28 | leftPnts.push(neckLeft);
29 | var rightPnts = [tailPnts[2]].concat(bodyPnts.slice((count / 2), count));
30 | rightPnts.push(neckRight);
31 | leftPnts = this.c0.fv(leftPnts);
32 | rightPnts =this.c0.fv(rightPnts);
33 | rings = leftPnts.concat(headPnts, rightPnts.reverse(), [tailPnts[1], leftPnts[0]]);
34 | return rings;
35 | },
36 | /**
37 | * 获取尾部
38 | */
39 | fz:function(points, tailLeft, tailRight) {
40 | var allLen = this.c0.fd(points);
41 | var tailWidth = (allLen * this.af);
42 | var tailLeft = this.c0.fl(points[1], points[0], this.c0.HALF_PI, tailWidth, false);
43 | var tailRight = this.c0.fl(points[1], points[0], this.c0.HALF_PI, tailWidth, true);
44 | var len = (tailWidth * this.ag);
45 | var swallowTailPnt = this.c0.fl(points[1], points[0], 0, len, true);
46 | return ([tailLeft, swallowTailPnt, tailRight]);
47 | }
48 | });
49 | }) ;
--------------------------------------------------------------------------------
/src/components/search/routes/RouteLocationSelector.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { connect } from 'dva';
3 | import { Icon, Button } from 'antd';
4 | import styles from './RouteLocationSelector.css';
5 |
6 | /**
7 | * 起点与终点二次选择器
8 | * 根据用户输入的关键词模糊查询的可选项
9 | */
10 | class RouteLocationSelector extends React.Component {
11 |
12 | renderItems() {
13 | if (this.props.search.diropts) {
14 | return this.props.search.diropts.map((opt, index) => {
15 | return (
16 |
17 |
18 | {index + 1}
19 |
20 |
21 | {opt.name}
22 | {opt.address}
23 |
24 |
25 |
26 |
27 |
28 | );
29 | });
30 | }
31 |
32 | return null;
33 | }
34 |
35 | render() {
36 | return (
37 |
38 | {/*
39 |
40 |
{this.props.title}
41 | */}
42 |
{this.renderItems()}
43 |
44 | );
45 | }
46 | }
47 |
48 | export default connect(({ search }) => {
49 | return {
50 | search,
51 | };
52 | })(RouteLocationSelector);
53 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/Measure3Dbutton/components/Slice3D.jsx:
--------------------------------------------------------------------------------
1 | /**
2 | * 剖析微件
3 | * @author wangxd
4 | */
5 | import { useRef, useState, useEffect } from 'react';
6 | import { connect } from 'dva';
7 | import { Spin, Icon } from 'antd';
8 | import * as jsapi from '../../../../utils/jsapi';
9 |
10 | let widget;
11 |
12 | const Slice3D = props => {
13 | const domRef = useRef(null);
14 | const [loading, setLoading] = useState(true);
15 |
16 | useEffect(() => {
17 | if (domRef.current) {
18 | jsapi.load(['esri/widgets/Slice']).then(([Slice]) => {
19 | setLoading(false);
20 |
21 | const div = document.createElement('div');
22 | widget = new Slice({
23 | view: props.view,
24 | container: div,
25 | });
26 | domRef.current.appendChild(div);
27 | // changeLineUnit();
28 | });
29 | } else if (!props.agsmap.deactivate3) {
30 | widget.destroy();
31 | console.log('删除');
32 | }
33 |
34 | return () => {
35 | if (widget) {
36 | widget.destroy();
37 | }
38 | };
39 | }, [props.agsmap.deactivate3]);
40 |
41 | return (
42 |
43 |
44 | {loading && (
45 |
52 | }
56 | />
57 |
58 | )}
59 |
60 | );
61 | };
62 |
63 | export default connect(({ agsmap }) => {
64 | return { agsmap };
65 | })(Slice3D);
66 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "geomap",
3 | "private": true,
4 | "scripts": {
5 | "start": "cross-env PORT=8013 HOST=localhost umi dev",
6 | "build": "umi build",
7 | "test": "umi test",
8 | "lint": "eslint --ext .js src mock tests"
9 | },
10 | "dependencies": {
11 | "@geomap/utils": "^0.2.0",
12 | "classnames": "^2.2.6",
13 | "echarts": "^4.2.1",
14 | "esri-loader": "^2.9.1",
15 | "jquery": "^3.4.1",
16 | "lodash": "^4.17.11",
17 | "nprogress": "^0.2.0",
18 | "qs": "^6.7.0",
19 | "rc-queue-anim": "^1.6.10",
20 | "rc-scroll-anim": "^2.5.6",
21 | "rc-tween-one": "^2.2.19",
22 | "react": "^16.8.6",
23 | "react-color": "^2.17.0",
24 | "react-custom-scrollbars": "^4.2.1",
25 | "react-document-title": "^2.0.3",
26 | "react-dom": "^16.8.6",
27 | "react-github-button": "^0.1.11",
28 | "react-resize-detector": "^4.2.0",
29 | "xmldom": "^0.1.27"
30 | },
31 | "devDependencies": {
32 | "@geomap/utils": "^0.2.0",
33 | "babel-eslint": "^9.0.0",
34 | "cross-env": "^5.1.4",
35 | "dojo-typings": "^1.11.9",
36 | "eslint": "^5.4.0",
37 | "eslint-config-umi": "^1.4.0",
38 | "eslint-plugin-flowtype": "^2.50.0",
39 | "eslint-plugin-import": "^2.14.0",
40 | "eslint-plugin-jsx-a11y": "^5.1.1",
41 | "eslint-plugin-react": "^7.11.1",
42 | "eslint-plugin-react-hooks": "^1.6.0",
43 | "husky": "^0.14.3",
44 | "lint-staged": "^7.2.2",
45 | "react-test-renderer": "^16.7.0",
46 | "umi": "^2.6.3",
47 | "umi-plugin-react": "^1.6.0"
48 | },
49 | "lint-staged": {
50 | "*.{js,jsx}": [
51 | "eslint --fix",
52 | "git add"
53 | ]
54 | },
55 | "engines": {
56 | "node": ">=8.0.0"
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/src/services/tianditu/searchpoi.js:
--------------------------------------------------------------------------------
1 | import request from '../../utils/request';
2 |
3 | const URL_QUERY = 'http://api.tianditu.gov.cn/search';
4 |
5 | export function queryBusStation(key, start) {
6 | const p = new URLSearchParams();
7 | p.append('type', 'query');
8 | p.append('tk', window.geosearchcfg.tianditu.key);
9 | p.append(
10 | 'postStr',
11 | JSON.stringify({
12 | keyWord: key,
13 | mapBound: '-180,90,180,90',
14 | queryType: '6',
15 | level: '11',
16 | count: '5',
17 | start: `${start}`,
18 | }),
19 | );
20 |
21 | return request(`${URL_QUERY}?${p.toString()}`, {
22 | method: 'GET',
23 | });
24 | }
25 |
26 | export function queryPoi(key, level, bound, start) {
27 | const p = new URLSearchParams();
28 | p.append('type', 'query');
29 | p.append('tk', window.geosearchcfg.tianditu.key);
30 | p.append(
31 | 'postStr',
32 | JSON.stringify({
33 | keyWord: key,
34 | mapBound: bound,
35 | queryType: '7',
36 | level: `${level}`,
37 | count: '1000',
38 | start: `${start}`,
39 | }),
40 | );
41 |
42 | return request(`${URL_QUERY}?${p.toString()}`, {
43 | method: 'GET',
44 | });
45 | }
46 |
47 | export function queryNearbyPoi(key, point, level, bound, start) {
48 | const p = new URLSearchParams();
49 | p.append('type', 'query');
50 | p.append('tk', window.geosearchcfg.tianditu.key);
51 | p.append(
52 | 'postStr',
53 | JSON.stringify({
54 | keyWord: key,
55 | mapBound: bound,
56 | queryType: '3',
57 | queryRadius: '3000',
58 | pointLonlat: point,
59 | level: `${level}`,
60 | count: '1000',
61 | start: `${start}`,
62 | }),
63 | );
64 |
65 | return request(`${URL_QUERY}?${p.toString()}`, {
66 | method: 'GET',
67 | });
68 | }
69 |
--------------------------------------------------------------------------------
/src/components/search/SearchResultDetail.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | flex: 0 1 auto;
3 | /* margin-top: 4px; */
4 | /* width: 395px; */
5 | pointer-events: all;
6 | display: flex;
7 | flex-direction: column;
8 | /* overflow: auto; */
9 | /*background: rgba(59, 59, 59, 0.8);*/
10 | background: white;
11 | border: 1px solid #ddd;
12 | /* height: 86%; */
13 | /* position: absolute; */
14 | /* bottom: 10px;
15 | top: 40px; */
16 | box-shadow: 1px 2px 1px rgba(0, 0, 0, .15);
17 | }
18 |
19 | .bar {
20 | /* color: rgb(255, 255, 255); */
21 | padding: 8px 12px;
22 | border-width: initial;
23 | border-style: none;
24 | border-color: initial;
25 | border-image: initial;
26 | background: #fff !important;
27 | border-bottom: 1px solid #eee;
28 | }
29 |
30 | .returnIcon {
31 | /*color: #000;*/
32 | }
33 |
34 | .barText {
35 | color: rgba(0, 0, 0, 0.65);
36 | font-size: 14px;
37 | margin-left: 10px;
38 | }
39 |
40 | .content {
41 | display: flex;
42 | flex-direction: column;
43 | overflow: auto;
44 | }
45 |
46 | .itemtitle {
47 | height: 96px;
48 | background: #3285FF;
49 | color: white;
50 | padding: 15px;
51 | font-size: 16px;
52 | }
53 |
54 | .itembar {
55 | height: 38px;
56 | display: flex;
57 | flex-direction: row;
58 | align-items: center;
59 | color: #3285FF;
60 | font-size: 12px;
61 | padding: 0 15px;
62 | border-bottom: 1px solid #ececec;
63 | }
64 |
65 | .itemdesc {
66 | padding: 15px;
67 | }
68 |
69 | .itemdesc>section {
70 | display: flex;
71 | flex-direction: row;
72 | align-items: center;
73 | }
74 |
75 | .itemdesc>section>h2 {
76 | flex: none;
77 | }
78 |
79 | .itemdesc>section>p {
80 | flex: auto;
81 | margin-left: 15px;
82 | }
83 |
84 | .itemDetailContent {
85 | background: #fff;
86 | }
87 |
88 | .viewMileageMapIcon {
89 | float: right;
90 | /*font-size: 19px;*/
91 | }
--------------------------------------------------------------------------------
/src/components/search/routes/RouteLocationSelector.css:
--------------------------------------------------------------------------------
1 | .wrap {
2 | display: flex;
3 | flex-direction: column;
4 | /*margin-top: 10px;*/
5 | width: 395px;
6 | pointer-events: all;
7 | background-color: #fff;
8 | border-top: 1px solid rgb(236, 236, 236);
9 | }
10 |
11 | .icon {
12 | font-size: 20px;
13 | }
14 |
15 | .banner {
16 | height: 40px;
17 | padding: 0 10px;
18 | background-color: transparent;
19 | color: white;
20 | border: 1px solid rgba(255, 255, 255, 0.5);
21 | color: #000;
22 | border-bottom: 1px solid #1870ff;
23 | display: flex;
24 | flex-direction: row;
25 | align-items: center;
26 | }
27 |
28 | .title {
29 | margin-bottom: 0;
30 | margin-left: 10px;
31 | /*color: white;*/
32 | }
33 |
34 | .diroptlist {
35 | background: transparent;
36 | padding: 5px 0;
37 | }
38 |
39 | .itemwrap {
40 | display: flex;
41 | flex-direction: row;
42 | height: 56px;
43 | align-items: flex-start;
44 | padding: 6px 8px;
45 | }
46 |
47 | .itemwrap:hover {
48 | background-color: rgba(155, 155, 155, 0.1);
49 | cursor: pointer;
50 | }
51 |
52 | .itemicon {
53 | flex: none;
54 | width: 40px;
55 | /*height: 40px;*/
56 | text-align: center;
57 | }
58 |
59 | .itemicon > span {
60 | display: inline-block;
61 | border-radius: 50%;
62 | height: 26px;
63 | width: 26px;
64 | margin-top: 9px;
65 | background-color: rgb(24, 112, 255);
66 | color: white;
67 | font-size: 16px;
68 | }
69 |
70 | .itemcontent {
71 | flex: auto;
72 | display: flex;
73 | flex-direction: column;
74 | margin-left: 10px;
75 | }
76 |
77 | .itemtitle {
78 | /* padding: 3px 0; */
79 | font-size: 14px;
80 | /* color: white; */
81 | line-height: 44px;
82 | }
83 |
84 | .itemsubtitle {
85 | font-size: 13px;
86 | color: #8c8c8c;
87 | }
88 |
89 | .itemaction {
90 | flex: none;
91 | align-self: center;
92 | }
93 |
--------------------------------------------------------------------------------
/src/components/toolbar/ToolbarSplit.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import styles from './ToolbarSplit.css';
3 | import { Button, Icon } from 'antd';
4 | import { connect } from 'react-redux';
5 |
6 | const ButtonGroup = Button.Group;
7 |
8 | class ToolbarSplit extends React.Component {
9 |
10 | constructor(props) {
11 | super(props);
12 | this.state = {
13 |
14 | }
15 | }
16 |
17 | /* 点击显示图层列表*/
18 | showLayerList = () => {
19 | this.props.dispatch({
20 | type: 'splitLayerList/changeLayerListVisible',
21 | payload: !this.props.splitLayerList.layerListVisible,
22 | });
23 | };
24 |
25 | /*退出分屏对比*/
26 | closeSplitLayer = () => {
27 | this.props.dispatch({
28 | type: 'layerList/changeSplitState',
29 | payload: false,
30 | });
31 | //退出分屏对比
32 | this.props.dispatch({
33 | type: 'agsmap/splitscreenChangeState',
34 | payload: false,
35 | });
36 | }
37 |
38 | render() {
39 | return (
40 |
41 |
42 |
46 |
50 |
51 |
52 | );
53 | }
54 | }
55 |
56 | ToolbarSplit.propTypes = {};
57 |
58 | export default connect(({ agsmap, splitLayerList }) => {
59 | return {
60 | agsmap,
61 | splitLayerList,
62 | };
63 | })(ToolbarSplit);
--------------------------------------------------------------------------------
/src/components/sceneviewer/zoom/index.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 | import { Icon } from 'antd';
3 | import classnames from 'classnames';
4 |
5 | import arcgis from '../../../utils/arcgis';
6 | import * as jsapi from '../../../utils/jsapi';
7 |
8 | import styles from './index.css';
9 |
10 | export default () => {
11 | const [loading, setLoading] = useState(true);
12 | const [vm, setVm] = useState(null);
13 |
14 | useEffect(() => {
15 | jsapi.load(['esri/widgets/Zoom/ZoomViewModel']).then(([ZoomViewModel]) => {
16 | const timer = setInterval(() => {
17 | if (arcgis.isViewReady()) {
18 | clearInterval(timer);
19 | const vm = new ZoomViewModel({
20 | view: window.agsGlobal.view,
21 | });
22 | setLoading(false);
23 | setVm(vm);
24 | }
25 | }, 300);
26 | });
27 | }, []);
28 |
29 | function onZoomIn() {
30 | if (!vm || vm.state !== 'ready') {
31 | return;
32 | }
33 |
34 | if (vm.canZoomIn) {
35 | vm.zoomIn();
36 | }
37 | }
38 |
39 | function onZoomOut() {
40 | if (!vm || vm.state !== 'ready') {
41 | return;
42 | }
43 |
44 | if (vm.canZoomOut) {
45 | vm.zoomOut();
46 | }
47 | }
48 |
49 | return (
50 |
51 |
58 | {loading ? : }
59 |
60 |
67 | {loading ? : }
68 |
69 |
70 | );
71 | };
72 |
--------------------------------------------------------------------------------
/src/services/portal4ags/item/totalItem.js:
--------------------------------------------------------------------------------
1 | // import request from '../../utils/request';
2 | import jQuery from 'jquery';
3 |
4 | export default function getTotalItem(dataObj) {
5 | // https://feng.arcgisonline.cn/portal/sharing/rest/search?f=json&num=100&start=1&sortField=type&sortOrder=asc&q=modified%3A%5B0000001527724800000%20TO%200000001557220958000%5D%20AND%20accountid%3A0123456789ABCDEF&t=content&f=json&token=mMmBBBLGUPLXy8AZ3kjJySN8tuRBpbKCqo3l-kzYmJWq7Eej3DUWhhFkhLiGxfmhE8ZnskzHCiQFXd3BANmscV5-zF2agKOp19ljxti7jVYCHrTW_opkwmAvbflisbZe-G-AAbz2-uSjGTAwdoYC9Ig6VS-IzBl8BbmGxMtomSTmFlW0HvYRNU65bYyUc85iCVNbgyfzxstHGGTypff0-Q..
6 |
7 | // https://feng.arcgisonline.cn/portal/sharing/rest/search?
8 | // f=json&num=100&start=1&sortField=type&sortOrder=asc
9 | // &q=modified%3A%5B0000001527724800000%20TO%200000001557220958000%5D%20AND%20accountid%3A0123456789ABCDEF
10 | // &t=content&token=mMmBBBLGUPLXy8AZ3kjJySN8tuRBpbKCqo3l-kzYmJWq7Eej3DUWhhFkhLiGxfmhE8ZnskzHCiQFXd3BANmscV5-zF2agKOp19ljxti7jVYCHrTW_opkwmAvbflisbZe-G-AAbz2-uSjGTAwdoYC9Ig6VS-IzBl8BbmGxMtomSTmFlW0HvYRNU65bYyUc85iCVNbgyfzxstHGGTypff0-Q..
11 | const startDateTimestamp = '1527724800000'; //2018-05-31 08:00:00
12 | // const endDateTimestamp = '1557220958000';//2019-05-07 17:22:38
13 | const endDateTimestamp = Math.round(new Date() / 1000) * 1000; //当前时间的时间戳
14 | console.log('当前时间的时间戳:' + endDateTimestamp);
15 | const requestUrl =
16 | 'https://' +
17 | dataObj.domainName +
18 | '/' +
19 | dataObj.webAdaptorName +
20 | '/sharing/rest/search?' +
21 | 'f=json&num=100&start=1&sortField=type&sortOrder=asc' +
22 | '&q=modified%3A%5B000000' +
23 | startDateTimestamp +
24 | '%20TO%20000000' +
25 | endDateTimestamp +
26 | '%5D%20AND%20accountid%3A0123456789ABCDEF' +
27 | '&t=content&token=' +
28 | dataObj.token;
29 | return jQuery.ajax({
30 | type: 'GET',
31 | url: requestUrl,
32 | dataType: 'json' //dataType不能少
33 | });
34 | }
35 |
--------------------------------------------------------------------------------
/public/config/classconfig.js:
--------------------------------------------------------------------------------
1 | (function(window) {
2 | var config = {
3 | data: [
4 | {
5 | alias: '餐饮美食',
6 | icon: 'dining',
7 | code: 11,
8 | },
9 | {
10 | alias: '宾馆酒店',
11 | icon: 'hotel',
12 | code: 1201,
13 | },
14 | {
15 | alias: '购物',
16 | icon: 'shopping',
17 | code: 13,
18 | },
19 | {
20 | alias: '政府机构',
21 | icon: 'organization',
22 | code: 19,
23 | },
24 | {
25 | alias: '文化教育',
26 | icon: 'education',
27 | code: 16,
28 | },
29 | {
30 | alias: '医疗服务',
31 | icon: 'health',
32 | code: 17,
33 | },
34 | {
35 | alias: '景点',
36 | icon: 'featurespot',
37 | code: 1804,
38 | },
39 | {
40 | alias: '生活服务',
41 | icon: 'service',
42 | code: 21,
43 | },
44 | {
45 | alias: '交通设施',
46 | icon: 'transport',
47 | code: 23,
48 | },
49 | {
50 | alias: '金融',
51 | icon: 'finance',
52 | code: 15,
53 | },
54 | {
55 | alias: '地名',
56 | icon: 'place',
57 | code: 26,
58 | },
59 | {
60 | alias: '公司企业',
61 | icon: 'enterprise',
62 | code: 22,
63 | },
64 | {
65 | alias: '运动休闲',
66 | icon: 'entertain',
67 | code: 18,
68 | },
69 | {
70 | alias: '地产小区',
71 | icon: 'community',
72 | code: 1202,
73 | },
74 | {
75 | alias: '汽车服务',
76 | icon: 'carservice',
77 | code: 14,
78 | },
79 | {
80 | alias: '公共设施',
81 | icon: 'publicfacilities',
82 | code: 19,
83 | },
84 | {
85 | alias: '其他',
86 | icon: 'other',
87 | code: 27,
88 | },
89 | ],
90 | };
91 | window.classfg = config;
92 | })(window);
93 |
--------------------------------------------------------------------------------
/src/pages/sceneViewer/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { connect } from 'dva';
3 | import _ from 'lodash';
4 | import ReactResizeDetector from 'react-resize-detector';
5 | // 三维左侧工具条(home、放大、缩小、平移、旋转、指北针)
6 | import ToolbarLeft from '../../components/sceneviewer/toolbar/ToolbarLeft';
7 | // 三维右侧工具条
8 | import ToolbarRight from '../../components/sceneviewer/toolbar/ToolbarRight';
9 | // 三维工具条
10 | import Toolbar3D from '../../components/sceneviewer/toolbar/Toolbar3D';
11 |
12 |
13 | import { INIT_WEBSCENE } from '../../constants/action-types';
14 | import styles from './index.css';
15 |
16 | import RightContent from '../../components/content/RightContent';
17 |
18 | // wangxd:修改数据源模块
19 | // import ChangeDataSource from '../../components/ChangeDataSource/ChangeDataSource';
20 |
21 | class IndexPage extends React.Component {
22 | constructor(props) {
23 | super(props);
24 | this.state = {
25 | rightMaxHeight: undefined,
26 | };
27 | }
28 |
29 | componentDidMount() {
30 | this.props.dispatch({
31 | type: INIT_WEBSCENE,
32 | payload: {
33 | container: this.viewDiv,
34 | },
35 | });
36 | }
37 |
38 | render() {
39 | return (
40 |
41 |
(this.viewDiv = node)} className={styles.viewDiv}>
42 |
(this.rightRef = node)}>
43 |
44 | this.setState({ rightMaxHeight: height })}
48 | targetDomEl={this.rightRef}
49 | />
50 |
51 |
52 |
53 |
54 |
55 |
56 | );
57 | }
58 | }
59 |
60 | export default connect(({ agsmap }) => ({ agsmap }))(IndexPage);
61 |
--------------------------------------------------------------------------------
/src/components/search/Search.jsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { connect } from 'dva';
3 | import FuzzyQuery from './FuzzyQuery';
4 | import IdentifyQuery from './IdentifyQuery';
5 | import RoutePlan from './RoutePlan';
6 | import SearchResultCollapsePanel from './SearchResultCollapsePanel';
7 | import env from '../../utils/env';
8 | import styles from './Search.css';
9 | import SpaceQuery from '../spacequery/SpaceQuery';
10 | import * as SearchConsts from '../../constants/search';
11 | // import GeometryService from 'esri/tasks/geometryService';
12 |
13 | class Search extends React.Component {
14 | constructor(props) {
15 | super(props);
16 | this.callbackFuncList = {};
17 | this.widgetList = {};
18 | this.callbackFuncList[SearchConsts.MODE_LOCATION] = {};
19 | this.callbackFuncList[SearchConsts.MODE_DIRECTION] = {};
20 | this.callbackFuncList[SearchConsts.MODE_IDENTIFY] = {};
21 | this.callbackFuncList[SearchConsts.MODE_SPACE] = {};
22 | }
23 |
24 | componentDidMount() {
25 | const { dispatch } = this.props;
26 | // const geomServ = new GeometryService({
27 | // url: window.appcfg.geometryService,
28 | // });
29 | }
30 |
31 | render() {
32 | return (
33 |
34 |
35 |
36 |
37 |
38 |
41 |
42 | );
43 | }
44 |
45 | onComponentRef = (mode,ref ) => {
46 | this.widgetList[mode] = ref;
47 | }
48 |
49 | setCallBackFuncList =(mode, funcList)=>{
50 | this.callbackFuncList[mode] = funcList;
51 | }
52 | }
53 |
54 | export default connect(({ agsmap }) => {
55 | return {
56 | agsmap,
57 | };
58 | })(Search);
59 |
--------------------------------------------------------------------------------
/public/libs/poltmodules/ToolTip.js:
--------------------------------------------------------------------------------
1 | define('modules/ToolTip',[
2 | "dojo/_base/declare",
3 | "dojo/_base/lang",
4 | 'dojo/dom-construct',
5 | "dojo/on"
6 | ], function(declare,lang,domConstruct,on) {
7 | var ToolTip = declare([], {
8 | declaredClass: "ToolTip",
9 | constructor: function (options) {
10 | declare.safeMixin(this, options);
11 | this.creatTipDiv();
12 | },
13 | //����TipDiv Tip����Ĭ��Ϊ������ʼ����
14 | creatTipDiv:function(){
15 | this.tipDiv = domConstruct.create("div",{class:"toolTip", style:"position: fixed;display:none" });
16 | this.mapView.root.appendChild(this.tipDiv);
17 | },
18 | //����Tip��ʾ����
19 | //tip:string Tip��ʾ����
20 | setTipContent:function(tip){
21 | this.tipDiv.innerHTML=tip;
22 | },
23 | activeTip : function(yOffset){
24 | this.onMouseMove(yOffset);
25 | },
26 | deactivateTip : function(){
27 | if(this.tipMouseMoveFn){
28 | this.tipMouseMoveFn.pause();
29 | this.tipDiv.style.display = "none";
30 | }
31 | },
32 | //����ƶ�ʱTip������
33 | //e:Object ���ص�����
34 | onMouseMove:function(yOffset){
35 | if(this.tipMouseMoveFn)
36 | this.tipMouseMoveFn.resume();
37 | else{
38 | this.tipMouseMoveFn = on.pausable(this.mapView.container,"mousemove",lang.hitch(this,function(e){
39 | var x = e.clientX + 5;
40 | var y = e.clientY + 20;
41 | this.tipDiv.style.left=x+"px";
42 | var yOff = 0;
43 | if (!!yOffset) {
44 | yOff = yOffset;
45 | }
46 | this.tipDiv.style.top=(y+yOff)+"px";
47 | this.tipDiv.style.display="block";
48 | }));
49 | }
50 | }
51 | });
52 | return ToolTip;
53 | });
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Geomap
2 | BY esrichina
3 |
4 | > **Note**: Geomap是一个高可重用,标准化和可扩展的前端Web GIS应用开发框架。该框架已经在ESRI中国平台实施部门内部推广使用,成功支撑了数个项目的应用开发需求,并得到客户的良好反馈。我们希望Geomap框架可以给使用ArcGIS平台的开发者们提供一些帮助。
5 |
6 | ## 1. 功能特色
7 | - [1.1](#folder--struct) **风格统一的地图操作工具**
8 |
9 | Geomap基于React封装了一系列的工具类微件,相比原生ArcGIS JSAPI中提供了更加丰富的选择,同时,所有的微件样式保持统一。
10 |
11 | - [1.2](#folder--struct) **可复用的GIS应用功能**
12 |
13 | Geomap提供了组件化封装的一系列GIS常用的应用功能,包括二三维地图中的标注与地图纠错,配置省、市、县三级行政区划定位,以及对接天地图的API实现了POI、公交换乘、路径规划等功能。
14 |
15 | - [1.3](#folder--struct) **基于Portal的登录/认证**
16 |
17 | Geomap实现了基于ArcGIS Portal的用户登录以及基于OAuth2的ClientID验证。
18 |
19 | - [1.4](#folder--struct) **动态的图层服务树**
20 |
21 | Geomap实现了基于Portal Item的动态图层服务树,以及各图层的开关。
22 |
23 | - [1.5](#folder--struct) **GP分析工具**
24 |
25 | Geomap实现了基于ArcGIS JSAPI 4.x调用ArcGIS GP分析Rest接口的功能,并以密度分析功能为例,实现了完整的GP分析应用交互流程。
26 |
27 |
28 | ## 2. 目录结构
29 | - [2.1](#folder--struct) **工程目录**
30 |
31 | ```bash
32 | ├── dist # 输出目录
33 | ├── public # dev server根目录, contentBase(打包后会完整copy到dist,不经过webpack处理)
34 | ├── config # 全局配置文件
35 | ├── libs # 其他3rd libs
36 | ├── images # 直接通过相对路径引用的图片资源文件,包括PictureMarkerSymbol
37 | ├── src # 源代码目录
38 | ├── assets # 全局资源文件(会经由webpack打包,其中小于10kb的图片会转换为内联的二进制数据)
39 | ├── components # React UI 组件
40 | ├── middlewares # Redux 中间件
41 | ├── models # Dva models
42 | ├── pages # Umi pages
43 | ├── services # Used for communicate with server
44 | └── utils # Utils
45 | └── request.js # A util wrapped dva/fetch
46 | ├── app.js # Entry file
47 | ├── global.css # 全局CSS文件入口
48 | ├── .env # Node 自定义 Environment参数
49 | ├── .eslintignore #
50 | ├── .eslintrc # Eslint config
51 | ├── .gitignore #
52 | ├── .prettierrc # prettier config
53 | ├── .umirc.js # Umi config
54 | └── package.json #
55 | ```
--------------------------------------------------------------------------------
/src/components/plot/geometrySymbolEditor/index.js:
--------------------------------------------------------------------------------
1 | import React, { useEffect } from 'react';
2 | import { message } from 'antd';
3 | import PolyLineSymbolEditor from './PolyLineSymbolEditor';
4 | import PolyGonSymbolEditor from './PolyGonSymbolEditor';
5 | import PointSymbolEditor from './PointSymbolEditor';
6 | import TextSymbolEditor from './TextSymbolEditor';
7 |
8 | const GeometrySymbolEditor = props => {
9 | useEffect(() => {
10 | if (!props.geometry) {
11 | message.warn('请选择图形');
12 | }
13 | },[]);
14 | //根据不同geometry类型加载不同的symbol编辑器
15 | const renderDom = () => {
16 | const type = getType();
17 | let com = null;
18 | switch (type) {
19 | case 'Point': {
20 | com = ;
21 | break;
22 | }
23 | case 'Polyline': {
24 | com = ;
25 | break;
26 | }
27 | case 'Polygon': {
28 | com = ;
29 | break;
30 | }
31 | case 'Text': {
32 | com = ;
33 | break;
34 | }
35 | default: {
36 | break;
37 | }
38 | }
39 | return com;
40 | };
41 | //获取 geometry类型
42 | const getType = () => {
43 | const geo = props.geometry;
44 | let geoType = null;
45 |
46 | switch (geo.geometry.type) {
47 | case 'point': {
48 | const symbol = geo.symbol;
49 | if (symbol.type === 'simple-marker') {
50 | geoType = 'Point';
51 | }
52 | if (symbol.type === 'text') {
53 | geoType = 'Text';
54 | }
55 | break;
56 | }
57 | case 'polyline': {
58 | geoType = 'Polyline';
59 | break;
60 | }
61 | case 'polygon': {
62 | geoType = 'Polygon';
63 | break;
64 | }
65 | }
66 | return geoType;
67 | };
68 |
69 | return {renderDom()}
;
70 | };
71 |
72 | export default GeometrySymbolEditor;
73 |
--------------------------------------------------------------------------------
/src/components/layerList/SplitLayerList.less:
--------------------------------------------------------------------------------
1 | @panel_height: 840px;
2 | .wrapClassName {
3 | pointer-events: none;
4 | }
5 | .inputmargin {
6 | margin-top: 12px;
7 | }
8 | .layerListBtn {
9 | flex: none;
10 | color: white;
11 | border: none;
12 | border-radius: 0 2px 2px 0;
13 | height: 38px;
14 | width: 48px;
15 | font-size: 20px;
16 | top: 70px;
17 | left: 395px;
18 | position: absolute;
19 | }
20 |
21 | .layerListPanel {
22 | width: 455px;
23 | height: @panel_height;
24 | background: #fff;
25 | position: absolute;
26 | right: 85px;
27 | top: 116px;
28 | bottom: 65px;
29 | z-index: 5;
30 | display: flex;
31 | border-radius: 4px 4px 0 0;
32 | flex-direction: column;
33 | box-shadow: 1px 2px 1px rgba(0,0,0,.15);
34 | border: 1px solid #eee;
35 | .title {
36 | font-size: 15px;
37 | width: 100%;
38 | line-height: 20px;
39 | border-radius: 4px 4px 0 0;
40 | padding: 8px 12px;
41 | color: #fff;
42 | background: #1870ff !important;
43 | border: none;
44 | .close {
45 | float: right;
46 | font-size: 16px;
47 | color: #ffffff;
48 | &:hover {
49 | cursor: pointer;
50 | // transform: rotate(45deg);
51 | }
52 | }
53 | }
54 | .toolBar {
55 | //background: #ffffff;
56 | color: #ffffff;
57 | width: 100%;
58 | height: 50px;
59 | line-height: 50px;
60 | padding: 0 20px 0 20px;
61 | text-align: center;
62 | border-bottom: 1px solid #ada6a6;
63 | }
64 | .content {
65 | height:800px;
66 | position: relative;
67 | padding-bottom: 10px;
68 | width: 100%;
69 | overflow-y: auto;
70 | color: rgb(22, 5, 5);
71 | .header{
72 | position: relative;
73 | color: rgba(0, 0, 0, 0.85);
74 | line-height: 22px;
75 | cursor: pointer;
76 | padding: 12px;
77 | background: rgb(250,250,250);
78 | transition: all 0.3s ease 0s;
79 | border-bottom: 1px solid #e8e8e8;
80 | }
81 | }
82 | .bottombar {
83 | width: 100%;
84 | height: 50px;
85 | float: right;
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/src/components/layerTree/layerList/LayerList.less:
--------------------------------------------------------------------------------
1 | @panel_height: 840px;
2 | .wrapClassName {
3 | pointer-events: none;
4 | }
5 | .inputmargin {
6 | margin-top: 12px;
7 | }
8 | .layerListBtn {
9 | flex: none;
10 | color: white;
11 | border: none;
12 | border-radius: 0 2px 2px 0;
13 | height: 38px;
14 | width: 48px;
15 | font-size: 20px;
16 | top: 70px;
17 | left: 395px;
18 | position: absolute;
19 | }
20 |
21 | .layerListPanel {
22 | width: 455px;
23 | height: @panel_height;
24 | background: #fff;
25 | position: absolute;
26 | right: 85px;
27 | top: 116px;
28 | bottom: 65px;
29 | z-index: 5;
30 | display: flex;
31 | border-radius: 4px 4px 0 0;
32 | flex-direction: column;
33 | box-shadow: 1px 2px 1px rgba(0,0,0,.15);
34 | border: 1px solid #eee;
35 | .title {
36 | font-size: 15px;
37 | width: 100%;
38 | line-height: 20px;
39 | border-radius: 4px 4px 0 0;
40 | padding: 8px 12px;
41 | color: #fff;
42 | background: #1870ff !important;
43 | border: none;
44 | .close {
45 | float: right;
46 | font-size: 16px;
47 | color: #ffffff;
48 | &:hover {
49 | cursor: pointer;
50 | // transform: rotate(45deg);
51 | }
52 | }
53 | }
54 | .toolBar {
55 | //background: #ffffff;
56 | color: #ffffff;
57 | width: 100%;
58 | height: 50px;
59 | line-height: 50px;
60 | padding: 0 20px 0 20px;
61 | text-align: center;
62 | border-bottom: 1px solid #ada6a6;
63 | }
64 | .content {
65 | height:800px;
66 | position: relative;
67 | padding-bottom: 10px;
68 | width: 100%;
69 | overflow-y: auto;
70 | color: rgb(22, 5, 5);
71 | .header{
72 | position: relative;
73 | color: rgba(0, 0, 0, 0.85);
74 | line-height: 22px;
75 | cursor: pointer;
76 | padding: 12px;
77 | background: rgb(250,250,250);
78 | transition: all 0.3s ease 0s;
79 | border-bottom: 1px solid #e8e8e8;
80 | }
81 | }
82 | .bottombar {
83 | width: 100%;
84 | height: 50px;
85 | float: right;
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/src/utils/envs.js:
--------------------------------------------------------------------------------
1 | export default {
2 | getPortal() {
3 | return window.appcfg.portal;
4 | },
5 |
6 | getWebMapId() {
7 | return window.appcfg.webMapId;
8 | },
9 |
10 | getWebSceneId() {
11 | return window.appcfg.webSceneId;
12 | },
13 |
14 | getParamAgs() {
15 | return window.agsGlobal;
16 | },
17 |
18 | setParamAgs(paramAgs) {
19 | window.agsGlobal = paramAgs;
20 | },
21 |
22 | setParamAgstwo(paramAgs) {
23 | window.agstwoGlobal = paramAgs;
24 | },
25 |
26 | getSplitItemIdone() {
27 | return window.appcfg.splitItemIdone;
28 | },
29 |
30 | getSplitItemIdtwo() {
31 | return window.appcfg.splitItemIdtwo;
32 | },
33 |
34 | getMultidateItemone() {
35 | return window.appcfg.multidateItemone;
36 | },
37 | getMultidateItemtwo() {
38 | return window.appcfg.multidateItemtwo;
39 | },
40 | getMultidateItemthree() {
41 | return window.appcfg.multidateItemthree;
42 | },
43 | getMultidateItemfour() {
44 | return window.appcfg.multidateItemfour;
45 | },
46 | getMultidateItemfive() {
47 | return window.appcfg.multidateItemfive;
48 | },
49 |
50 | getProxyUrl() {
51 | return window.appcfg.proxy;
52 | },
53 |
54 | getSigninUrl() {
55 | return window.appcfg.signin;
56 | },
57 |
58 | getClientId() {
59 | return window.appcfg.clientId;
60 | },
61 |
62 | getClientSecret() {
63 | return window.appcfg.clientSecret;
64 | },
65 |
66 | getInitialExtent() {
67 | return window.appcfg.initialExtent;
68 | },
69 |
70 | getDefaultBasemap2D() {
71 | return window.appcfg.basemaps.default2d;
72 | },
73 |
74 | getDefaultBasemap3D() {
75 | return window.appcfg.basemaps.default3d;
76 | },
77 |
78 | getDefaultBasemapDashBoard() {
79 | return window.appcfg.basemaps.defaultDashboard;
80 | },
81 |
82 | getDojoConfig() {
83 | return window.dojoConfig;
84 | },
85 | /**big screen */
86 | getDpWebmapId(){
87 | return window.appcfg.dpWebMapId;
88 | },
89 | setParamDpAgs(ags){
90 | window.dpagsGlobal = ags;
91 | },
92 | getParamDpAgs(){
93 | return window.dpagsGlobal;
94 | },
95 | };
96 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/toolbar/ToolbarLeft.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 | import { connect } from 'dva';
3 | import { Icon } from 'antd';
4 | import classnames from 'classnames';
5 | import arcgis from '../../../utils/arcgis';
6 | import Zoom from '../zoom/';
7 | import Compass from '../compass/index';
8 | import Home from '../home';
9 |
10 | import styles from './Toolbarleft.css';
11 |
12 | const ToolbarLeft = () => {
13 | const [loading, setLoading] = useState(true);
14 |
15 | useEffect(() => {
16 | if (arcgis.isViewReady()) {
17 | setLoading(false);
18 | } else {
19 | const timer = setInterval(() => {
20 | if (arcgis.isViewReady()) {
21 | clearInterval(timer);
22 | setLoading(false);
23 | }
24 | }, 300);
25 | }
26 | });
27 |
28 | /**
29 | * 3D【平移功能】回调
30 | * author:
31 | * @param {*} e
32 | */
33 | const mapPan = e => {
34 | e.stopPropagation();
35 | window.GeomapUtils.view.map3d.changeToggle(window.agsGlobal.view, 'pan');
36 | };
37 |
38 | /**
39 | * 3D【环绕旋转】回调
40 | * author:
41 | * @param {*} e
42 | */
43 | const mapRotate = e => {
44 | e.stopPropagation();
45 | window.GeomapUtils.view.map3d.changeToggle(window.agsGlobal.view, 'rotate');
46 | };
47 |
48 | return (
49 |
50 |
51 |
52 |
53 |
60 | {loading ? : }
61 |
62 |
69 | {loading ? : }
70 |
71 |
72 |
73 |
74 | );
75 | };
76 |
77 | export default connect(({ agsmap }) => {
78 | return {
79 | agsmap,
80 | };
81 | })(ToolbarLeft);
82 |
--------------------------------------------------------------------------------
/src/components/mapviewer/zoom/index.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 | import { Icon } from 'antd';
3 | import * as jsapi from '../../../utils/jsapi';
4 |
5 | import styles from './index.css';
6 | /**
7 | * 放大缩小组件
8 | * @author lee
9 | */
10 |
11 | const Zoom = props => {
12 | const [vm, setVm] = useState(null);
13 | // 监听是否是最大zoom
14 | const [maxZoomed, setMaxZoomed] = useState(false);
15 | // 监听是否是最小zoom
16 | const [minZoomed, setMinZoomed] = useState(false);
17 | const [zoomVal, setZoomVal] = useState(null);
18 |
19 | useEffect(() => {
20 | const timer = setInterval(() => {
21 | if (window.agsGlobal.view) {
22 | clearInterval(timer);
23 | createWidget(window.agsGlobal.view);
24 | }
25 | }, 300);
26 | }, []);
27 |
28 | // 创建微件
29 | function createWidget(view) {
30 | jsapi
31 | .load(['esri/widgets/Zoom/ZoomViewModel', 'esri/core/watchUtils'])
32 | .then(([ZoomViewModel, watchUtils]) => {
33 | const vmstate = new ZoomViewModel();
34 | vmstate.view = view;
35 | setVm(vmstate);
36 | watchUtils.init(view, 'zoom', val => {
37 | setMaxZoomed(val === view.constraints.maxZoom);
38 | setMinZoomed(val === view.constraints.minZoom);
39 | });
40 | });
41 | watchZoom(view);
42 | }
43 | // 缩小功能
44 | function zoomIn() {
45 | if (!maxZoomed && vm && vm.zoomIn()) {
46 | vm.zoomIn();
47 | }
48 | }
49 | // 放大功能
50 | function zoomOut() {
51 | if (!minZoomed && vm && vm.zoomOut()) {
52 | vm.zoomOut();
53 | }
54 | }
55 | // 监听zoom变化
56 | function watchZoom(view) {
57 | setZoomVal(view.zoom);
58 | view.watch('zoom', newValue => {
59 | setZoomVal(Math.round(newValue));
60 | });
61 | }
62 |
63 | return (
64 |
73 | );
74 | };
75 |
76 | export default Zoom;
77 |
--------------------------------------------------------------------------------
/src/pages/sceneViewer/index.css:
--------------------------------------------------------------------------------
1 | .wrapper {
2 | margin: 0;
3 | padding: 0;
4 | height: 100vh;
5 | width: 100vw;
6 | display: flex;
7 | flex-direction: row;
8 | }
9 |
10 | .header {
11 | flex: none;
12 | height: 45px;
13 | padding: 0 20px;
14 | display: flex;
15 | flex-direction: row;
16 | align-items: center;
17 | justify-content: space-between;
18 | background-color: #505360;
19 | }
20 |
21 | .title {
22 | display: block;
23 | font-size: 20px;
24 | color: white;
25 | float: right;
26 | }
27 |
28 | .actionContainer {
29 | flex: none;
30 | display: flex;
31 | flex-direction: row;
32 | align-items: center;
33 | }
34 |
35 | .btn {
36 | margin: 0 10px;
37 | font-size: 20px;
38 | font-weight: 650;
39 | }
40 |
41 | .viewDiv {
42 | flex: auto;
43 | margin: 0;
44 | padding: 0;
45 | display: flex;
46 | position: relative;
47 | }
48 |
49 | .viewDiv > div {
50 | flex: auto;
51 | }
52 |
53 | .viewDiv .componentBasemap {
54 | position: absolute;
55 | bottom: 5px;
56 | right: 5px;
57 | z-index: 1;
58 | }
59 |
60 | .viewDiv .componentZoom {
61 | position: absolute;
62 | bottom: 100px;
63 | right: 10px;
64 | z-index: 1;
65 | }
66 |
67 | .viewDiv .componentCompass {
68 | position: absolute;
69 | bottom: 190px;
70 | right: 0;
71 | z-index: 12;
72 | }
73 |
74 | .fenpingDiv {
75 | position: absolute;
76 | }
77 |
78 | .zhu {
79 | position: absolute;
80 | top: 0;
81 | left: 0;
82 | width: 100%;
83 | height: 100%;
84 | display: block;
85 | z-index: 10;
86 | }
87 |
88 | .fufirst {
89 | width: 50%;
90 | height: 100%;
91 | float: left;
92 | }
93 |
94 | .fuscend {
95 | width: 50%;
96 | height: 100%;
97 | float: left;
98 | }
99 |
100 | .menuContrl {
101 | position: absolute;
102 | /* left: 30px; */
103 | bottom: 100px;
104 | z-index: 100;
105 | }
106 |
107 | .exitroll {
108 | position: absolute;
109 | top: 76px;
110 | left: 70px;
111 | z-index: 200000;
112 | }
113 |
114 | .mapRightWrap {
115 | position: absolute;
116 | top: 70px;
117 | bottom: 10px;
118 | right: 50px;
119 | width: 360px;
120 | z-index: 10;
121 | pointer-events: none;
122 | }
123 |
--------------------------------------------------------------------------------
/public/config/searchConfig.js:
--------------------------------------------------------------------------------
1 | (function(window) {
2 | var baiduAK = '2436c002d1b49cde10213acef9a616e3'; // 百度地图API用户AK
3 | var searchConfig = {
4 | /*----------------- 搜索配置 ----------------*/
5 | typeList: [], // 查询分类经后台查询
6 | typeListQueryUrl: 'http://pgis.arcgisonline.cn/pgisServer/geoSolr/getTypeList', // 查询模糊查询中分类列表
7 | pageSize: 10, // 查询结构列表每页显示多少条
8 | smartTipSize: 10, // 智能提示显示多少条
9 | tolerance: 0.0005, // 设置属性查询时空间范围容差参数,程序中使用该系数*比例尺为半径做缓冲区
10 | solrQueryUrl: 'http://pgis.arcgisonline.cn/pgisServer/geoSolr/postSearch', // solr查询地址
11 |
12 | /*----------------- 导航配置 ----------------*/
13 | addressTipApiUrl:
14 | 'http://api.map.baidu.com/place/v2/suggestion?query={keyword}®ion=北京&output=json&ak=' +
15 | baiduAK, // 地点输入提示服务
16 |
17 | poiApiUrl: 'http://api.map.baidu.com/place/v2/search?query={keyword}®ion=北京&coord_type=1&bounds={bounds}&page_size={pageSize}&page_num={pageNum}&output=json&ak=' + baiduAK, // 地点输入提示服务
18 |
19 | // poiApiUrl:
20 | // 'http://map.baidu.com/?newmap=1&reqflag=pcmap&biz=1&from=webmap&da_par=baidu&pcevaname=pc4.1&c=131&qt=s&da_src=searchBox.button&wd={keyword}&src=0&wd2=&pn={pageNum}&sug=0&l=13&b=(12934490,4831059;12995930,4851795)&from=webmap&biz_forward={"scaler":1,"styles":"pl"}&sug_forward=&device_ratio=1&tn=B_NORMAL_MAP&nn=0&u_loc=12962210,4833291&ie=utf-8&t=1560154759297',
21 |
22 |
23 | driveApiUrl:
24 | 'http://api.map.baidu.com/directionlite/v1/driving?origin={origin}&destination={destination}&ak=' +
25 | baiduAK, // 驾车路线规划
26 | rideApiUrl:
27 | 'http://api.map.baidu.com/directionlite/v1/riding?origin={origin}&destination={destination}&ak=' +
28 | baiduAK, // 骑行路线规划
29 | walkApiUrl:
30 | 'http://api.map.baidu.com/directionlite/v1/walking?origin={origin}&destination={destination}&ak=' +
31 | baiduAK, // 步行路线规划
32 | busApiUrl:
33 | 'http://api.map.baidu.com/directionlite/v1/transit?origin={origin}&destination={destination}&ak=' +
34 | baiduAK, // 公交路线规划
35 | coordCovertApiUrl:
36 | 'http://api.map.baidu.com/geoconv/v1/?coords={coords}&from={fromCoord}&to={toCoord}&ak=' +
37 | baiduAK, // 坐标转换API地址
38 |
39 | };
40 |
41 | window.searchConfig = searchConfig;
42 | })(window);
43 |
--------------------------------------------------------------------------------
/src/components/search/GeoSearch.css:
--------------------------------------------------------------------------------
1 | .leftPanel {
2 | width: 425px;
3 | position: absolute;
4 | /* left: 300px; */
5 | /* top: 20px; */
6 | bottom: 20px;
7 | z-index: 5;
8 | pointer-events: none;
9 | display: flex;
10 | flex-direction: column;
11 | }
12 |
13 | .wrap {
14 | flex: none;
15 | width: 425px;
16 | height: 38px;
17 | border-radius: 2px;
18 | display: flex;
19 | flex-direction: row;
20 | pointer-events: all;
21 | }
22 |
23 | .input {
24 | flex: auto;
25 | height: 100%;
26 | border-right: none;
27 | border-left: 1px solid rgba(143, 141, 141, 0.26);
28 | border-top: 1px solid rgba(143, 141, 141, 0.26);
29 | border-bottom: 1px solid rgba(143, 141, 141, 0.26);
30 | border-radius: 0;
31 | }
32 |
33 | .inputgroup {
34 | flex: auto;
35 | height: 100%;
36 | display: flex;
37 | flex-direction: row;
38 | }
39 |
40 | .inputhint {
41 | background: #ececec;
42 | color: #666;
43 | padding: 0 10px;
44 | flex: none;
45 | display: flex;
46 | align-items: center;
47 | border: 1px solid #ddd;
48 | }
49 |
50 | .dirselector {
51 | flex: auto;
52 | height: 100%;
53 | border: none;
54 | border-radius: 0;
55 | }
56 |
57 | .dirbtnwrap {
58 | display: flex;
59 | flex-direction: row;
60 | align-items: center;
61 | height: 100%;
62 | width: 40px;
63 | background: white;
64 | border-top: rgba(143, 141, 141, 0.26) 1px solid;
65 | border-bottom: rgba(143, 141, 141, 0.26) 1px solid;
66 | }
67 |
68 | .dirbtnstub {
69 | flex: none;
70 | height: 26px;
71 | width: 1px;
72 | background: #eee;
73 | border: none;
74 | box-sizing: border-box;
75 | }
76 |
77 | .dirbtn {
78 | flex: auto;
79 | color: #3385ff;
80 | border: none;
81 | border-radius: 0;
82 | height: 100%;
83 | width: 40px;
84 | font-size: 24px;
85 | }
86 |
87 | .dirclosebtn {
88 | flex: auto;
89 | color: #999999;
90 | border: none;
91 | border-radius: 0;
92 | height: 100%;
93 | width: 40px;
94 | font-size: 24px;
95 | }
96 |
97 | .searchbtn {
98 | flex: none;
99 | color: white;
100 | border: none;
101 | border-radius: 0 2px 2px 0;
102 | height: 100%;
103 | width: 58px;
104 | font-size: 20px;
105 | }
106 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/compass/index.jsx:
--------------------------------------------------------------------------------
1 | // 罗盘微件
2 | import React, { useState, useEffect } from 'react';
3 | import { Icon } from 'antd';
4 | import classnames from 'classnames';
5 |
6 | import arcgis from '../../../utils/arcgis';
7 | import * as jsapi from '../../../utils/jsapi';
8 |
9 | import styles from './index.css';
10 |
11 | function toRotationTransform(orientation) {
12 | return {
13 | display: 'inline-block',
14 | fontSize: '24px',
15 | transform: `rotateZ(${orientation.z}deg)`,
16 | };
17 | }
18 |
19 | export default () => {
20 | const [loading, setLoading] = useState(true);
21 | const [vm, setVm] = useState(null);
22 | const [orientation, setorientation] = useState({ z: 0 });
23 |
24 | useEffect(() => {
25 | jsapi.load(['esri/widgets/Compass/CompassViewModel']).then(([CompassViewModel]) => {
26 | if (arcgis.isViewReady()) {
27 | const vm = new CompassViewModel({
28 | view: window.agsGlobal.view,
29 | });
30 | vm.watch('orientation', orientation => {
31 | setorientation(orientation);
32 | });
33 | setLoading(false);
34 | setVm(vm);
35 | } else {
36 | const timer = setInterval(() => {
37 | if (arcgis.isViewReady()) {
38 | clearInterval(timer);
39 | const vm = new CompassViewModel({
40 | view: window.agsGlobal.view,
41 | });
42 | vm.watch('orientation', orientation => {
43 | setorientation(orientation);
44 | });
45 | setLoading(false);
46 | setVm(vm);
47 | }
48 | }, 300);
49 | }
50 | });
51 | }, []);
52 |
53 | function reset() {
54 | if (!vm) {
55 | return;
56 | }
57 |
58 | vm.reset();
59 | }
60 |
61 | return (
62 |
63 |
70 | {loading ? (
71 |
72 | ) : (
73 |
74 | )}
75 |
76 |
77 | );
78 | };
79 |
--------------------------------------------------------------------------------
/src/pages/index.css:
--------------------------------------------------------------------------------
1 | .wrapper {
2 | margin: 0;
3 | padding: 0;
4 | height: 100vh;
5 | width: 100vw;
6 | display: flex;
7 | flex-direction: row;
8 | }
9 |
10 | .header {
11 | flex: none;
12 | height: 45px;
13 | padding: 0 20px;
14 | display: flex;
15 | flex-direction: row;
16 | align-items: center;
17 | justify-content: space-between;
18 | background-color: #505360;
19 | }
20 |
21 | .title {
22 | display: block;
23 | font-size: 20px;
24 | color: white;
25 | float: right;
26 | }
27 |
28 | .actionContainer {
29 | flex: none;
30 | display: flex;
31 | flex-direction: row;
32 | align-items: center;
33 | }
34 |
35 | .btn {
36 | margin: 0 10px;
37 | font-size: 20px;
38 | font-weight: 650;
39 | }
40 |
41 | .viewDiv {
42 | flex: auto;
43 | margin: 0;
44 | padding: 0;
45 | display: flex;
46 | position: relative;
47 | }
48 |
49 | .viewDiv > div {
50 | flex: auto;
51 | }
52 |
53 | .viewDiv .componentBasemap {
54 | position: absolute;
55 | width: 68px;
56 | height: 68px;
57 | right: 10px;
58 | bottom: 25px;
59 | z-index: 1;
60 | }
61 |
62 | .viewDiv .componentZoom {
63 | position: absolute;
64 | bottom: 100px;
65 | right: 10px;
66 | z-index: 1;
67 | }
68 |
69 | .viewDiv .componentCompass {
70 | position: absolute;
71 | bottom: 190px;
72 | right: 0;
73 | z-index: 12;
74 | }
75 |
76 | .fenpingDiv {
77 | position: absolute;
78 | }
79 |
80 | .zhu {
81 | position: absolute;
82 | top: 0;
83 | left: 0;
84 | width: 100%;
85 | height: 100%;
86 | display: block;
87 | z-index: 10;
88 | }
89 |
90 | .fufirst {
91 | width: 50%;
92 | height: 100%;
93 | float: left;
94 | }
95 |
96 | .fuscend {
97 | width: 50%;
98 | height: 100%;
99 | float: left;
100 | }
101 |
102 | .menuContrl {
103 | position: absolute;
104 | /* left: 30px; */
105 | bottom: 100px;
106 | z-index: 100;
107 | }
108 |
109 | .exitroll {
110 | position: absolute;
111 | top: 76px;
112 | left: 70px;
113 | z-index: 200000;
114 | }
115 |
116 | .mapRightWrap {
117 | position: absolute;
118 | top: 70px;
119 | bottom: 10px;
120 | right: 50px;
121 | width: 360px;
122 | z-index: 10;
123 | pointer-events: none;
124 | }
125 |
--------------------------------------------------------------------------------
/src/components/plot/img/polticon/polyline.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/Layerlist/components/LightShadowPanle/index.less:
--------------------------------------------------------------------------------
1 | .btn {
2 | display: inline-block;
3 | cursor: pointer;
4 | margin: 6px;
5 | width: 44px !important;
6 | height: 44px !important;
7 | border-radius: 50%;
8 | text-align: center;
9 | position: relative;
10 | z-index: 1;
11 | color: rgba(255, 255, 255, 0.7);
12 | box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
13 | transition: color 0.3s;
14 | background: #001529;
15 | font-size: 24px;
16 | font-weight: bold;
17 | }
18 |
19 | .btn:hover {
20 | background: #15e3e1;
21 | }
22 |
23 | .btnImg {
24 | /* width: 30px; */
25 | /* height: 30px; */
26 | position: absolute;
27 | top: 50%;
28 | left: 50%;
29 | margin-top: -21px; /* 高度的一半 */
30 | margin-left: -21px; /* 宽度的一半 */
31 | }
32 |
33 | .modlediv {
34 | position: fixed;
35 | right: 90px;
36 | top: 213px;
37 | z-index: 1;
38 | border-radius: 4px;
39 | box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
40 | }
41 | .listdiv {
42 | background-color: rgba(255, 255, 255, 1);
43 | width: 400px;
44 | border-radius: 4px;
45 | }
46 |
47 | .panle-header {
48 | height: 40px;
49 | padding: 0 10px;
50 | display: flex;
51 | justify-content: space-between;
52 | align-items: center;
53 | background: #eee;
54 | border-radius: 4px 4px 0 0;
55 |
56 | .panle-title {
57 | margin: 0;
58 | }
59 |
60 | .close-btn {
61 | color: red;
62 | font-size: 16px;
63 | }
64 | }
65 |
66 | .checkDiv {
67 | margin: 10px;
68 | font-size: 16px;
69 | letter-spacing: 1px;
70 | }
71 |
72 | .legendline {
73 | height: 25px;
74 | width: 100px;
75 | margin-left: 30px;
76 | }
77 | .colorbox {
78 | display: inline-block;
79 | width: 14px;
80 | height: 14px;
81 | background-color: blueviolet;
82 | margin-left: 5px;
83 | margin-right: 5px;
84 | opacity: 0.75;
85 | }
86 |
87 | .timeInfo {
88 | color: white;
89 | font-family: Lucida Grande, Helvetica, sans-serif;
90 | }
91 |
92 | .timeField {
93 | font-size: 40px;
94 | }
95 |
96 | .timeLocation {
97 | font-size: 60px;
98 | }
99 |
100 | .clock {
101 | width: 220px;
102 | height: 220px;
103 | }
104 |
105 | .settingInfo {
106 | padding: 10px;
107 | }
108 |
109 | .settingItem {
110 | line-height: 35px;
111 | }
112 |
--------------------------------------------------------------------------------
/src/components/sceneviewer/LightShadow/components/LightShadowPanle/index.less:
--------------------------------------------------------------------------------
1 | .btn {
2 | display: inline-block;
3 | cursor: pointer;
4 | margin: 6px;
5 | width: 44px !important;
6 | height: 44px !important;
7 | border-radius: 50%;
8 | text-align: center;
9 | position: relative;
10 | z-index: 1;
11 | color: rgba(255, 255, 255, 0.7);
12 | box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
13 | transition: color 0.3s;
14 | background: #001529;
15 | font-size: 24px;
16 | font-weight: bold;
17 | }
18 |
19 | .btn:hover {
20 | background: #15e3e1;
21 | }
22 |
23 | .btnImg {
24 | /* width: 30px; */
25 | /* height: 30px; */
26 | position: absolute;
27 | top: 50%;
28 | left: 50%;
29 | margin-top: -21px; /* 高度的一半 */
30 | margin-left: -21px; /* 宽度的一半 */
31 | }
32 |
33 | .modlediv {
34 | position: fixed;
35 | right: 90px;
36 | top: 213px;
37 | z-index: 1;
38 | border-radius: 4px;
39 | box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
40 | }
41 | .listdiv {
42 | background-color: rgba(255, 255, 255, 1);
43 | width: 400px;
44 | border-radius: 4px;
45 | }
46 |
47 | .panle-header {
48 | height: 40px;
49 | padding: 0 10px;
50 | display: flex;
51 | justify-content: space-between;
52 | align-items: center;
53 | background: #eee;
54 | border-radius: 4px 4px 0 0;
55 |
56 | .panle-title {
57 | margin: 0;
58 | }
59 |
60 | .close-btn {
61 | color: red;
62 | font-size: 16px;
63 | }
64 | }
65 |
66 | .checkDiv {
67 | margin: 10px;
68 | font-size: 16px;
69 | letter-spacing: 1px;
70 | }
71 |
72 | .legendline {
73 | height: 25px;
74 | width: 100px;
75 | margin-left: 30px;
76 | }
77 | .colorbox {
78 | display: inline-block;
79 | width: 14px;
80 | height: 14px;
81 | background-color: blueviolet;
82 | margin-left: 5px;
83 | margin-right: 5px;
84 | opacity: 0.75;
85 | }
86 |
87 | .timeInfo {
88 | color: white;
89 | font-family: Lucida Grande, Helvetica, sans-serif;
90 | }
91 |
92 | .timeField {
93 | font-size: 40px;
94 | }
95 |
96 | .timeLocation {
97 | font-size: 60px;
98 | }
99 |
100 | .clock {
101 | width: 220px;
102 | height: 220px;
103 | }
104 |
105 | .settingInfo {
106 | padding: 10px;
107 | }
108 |
109 | .settingItem {
110 | line-height: 35px;
111 | }
112 |
--------------------------------------------------------------------------------
/src/components/layerList/img/polticon/polyline.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/components/mapviewer/viewInfo/index.jsx:
--------------------------------------------------------------------------------
1 | import React, { useState, useEffect } from 'react';
2 | import _ from 'lodash';
3 |
4 | import styles from './index.css';
5 |
6 | const ViewInfo = props => {
7 | const [latitude, setLatitude] = useState('');
8 | const [longitude, setLongitude] = useState('');
9 | const [scale, setScale] = useState('');
10 | const [lod, setLod] = useState('');
11 |
12 |
13 | useEffect(() => {
14 | const timer = setInterval(() => {
15 | if (window.agsGlobal.view) {
16 | clearInterval(timer);
17 | loadViewInfo(window.agsGlobal.view);
18 | }
19 | }, 300);
20 | }, []);
21 |
22 | function loadViewInfo(view) {
23 | view.when(view => {
24 | setLod(parseInt(view.zoom));
25 | setScale(parseInt(view.scale));
26 | view.watch('zoom', () => {
27 | setLod(parseInt(view.zoom));
28 | setScale(parseInt(view.scale));
29 | });
30 | view.on(
31 | 'pointer-move',
32 | _.throttle(event => {
33 | // 将屏幕点坐标转化为map点坐标
34 | const point = view.toMap({ x: event.x, y: event.y });
35 | const lng = (point.x / 20037508.34) * 180;
36 | const mmy = (point.y / 20037508.34) * 180;
37 | const lat =
38 | (180 / Math.PI) * (2 * Math.atan(Math.exp((mmy * Math.PI) / 180)) - Math.PI / 2);
39 | setLatitude(Math.round(lat * 100) / 100);
40 | setLongitude(Math.round(lng * 100) / 100);
41 | }, 100)
42 | );
43 | });
44 | }
45 |
46 | return (
47 |
48 |
49 |
50 |
51 | 经度:
52 | {longitude}
53 |
54 |
55 | 纬度:
56 | {latitude}
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 | 比例尺:
66 | {scale}
67 |
68 |
69 | LOD:
70 | {lod}
71 |
72 |
73 |
74 |
75 | );
76 | };
77 |
78 | export default ViewInfo;
79 |
--------------------------------------------------------------------------------
/src/utils/request.js:
--------------------------------------------------------------------------------
1 | import fetch from 'dva/fetch';
2 | // import fetchJsonp from 'fetch-jsonp'
3 | import NProgress from 'nprogress';
4 |
5 | function parseJSON(response) {
6 | return response.json();
7 | }
8 |
9 | function parseText(response) {
10 | return response.text();
11 | }
12 | function parseArrayBuffer(response){
13 | return response.arrayBuffer();
14 | }
15 | function checkStatus(response) {
16 | if ((response.status >= 200 && response.status < 300)|| response.ok === true) {
17 | return response;
18 | }
19 |
20 | const error = new Error(response.statusText);
21 | error.response = response;
22 | throw error;
23 | }
24 |
25 | /**
26 | * Requests a URL, returning a promise.
27 | *
28 | * @param {string} url The URL we want to request
29 | * @param {object} [options] The options we want to pass to "fetch"
30 | * @return {object} An object containing either "data" or "err"
31 | */
32 | export default function request(url, options) {
33 | NProgress.start();
34 |
35 | return fetch(url, options)
36 | .then(checkStatus)
37 | .then(parseJSON)
38 | .then((data) => {
39 | NProgress.done();
40 | return { data };
41 | })
42 | .catch((err) => {
43 | NProgress.done();
44 | return { err };
45 | });
46 | }
47 |
48 | export function requestJsonp(url, options) {
49 | NProgress.start();
50 |
51 | return fetchJsonp(url, options)
52 | .then(checkStatus)
53 | .then(parseJSON)
54 | .then((data) => {
55 | NProgress.done();
56 | return { data };
57 | })
58 | .catch((err) => {
59 | NProgress.done();
60 | return { err };
61 | });
62 | }
63 |
64 |
65 |
66 | export function requestText(url, options) {
67 | NProgress.start();
68 |
69 | return fetch(url, options)
70 | .then(checkStatus)
71 | .then(parseText)
72 | .then((data) => {
73 | NProgress.done();
74 | return { data };
75 | })
76 | .catch((err) => {
77 | NProgress.done();
78 | return { err };
79 | });
80 | }
81 |
82 | export function requestArrayBuffer(url,options){
83 | NProgress.start();
84 |
85 | return fetch(url, options)
86 | .then(checkStatus)
87 | .then(parseArrayBuffer)
88 | .then((data) => {
89 | NProgress.done();
90 | return { data };
91 | })
92 | .catch((err) => {
93 | NProgress.done();
94 | return { err };
95 | });
96 | }
97 |
--------------------------------------------------------------------------------
/src/utils/arcgis/layerTree/layertreeutils.js:
--------------------------------------------------------------------------------
1 | //pensiveant:数据选择依赖
2 |
3 | export default {
4 | /**
5 | * 获取树节点初始化选中状态
6 | */
7 | getInitCheckTreeNode() {
8 | const allTreeNodes = this.getAllTreeNodes();
9 | const checkTreeNodes = allTreeNodes.filter(node => {
10 | return node.visible === true;
11 | });
12 | return checkTreeNodes;
13 | },
14 | /**
15 | * 根据树节点key获取树节点对象
16 | * @param {*} key
17 | */
18 | getTreeObjByKey(key) {
19 | const treesArr = this.getAllTreeNodes();
20 | const treeObj = treesArr.find(obj => {
21 | return obj.key === key;
22 | });
23 | return treeObj;
24 | },
25 | /**
26 | * 获取所有树节点对象
27 | */
28 | getAllTreeNodes() {
29 | const trees = window.subjectMapConfig;
30 | const treesArr = [];
31 | trees.map(tree => {
32 | if (tree.children) {
33 | tree.children.map(son => {
34 | if (son.children) {
35 | son.children.map(s => {
36 | treesArr.push(s);
37 | });
38 | } else {
39 | treesArr.push(son);
40 | }
41 | treesArr.push(son);
42 | });
43 | treesArr.push(tree);
44 | } else {
45 | treesArr.push(tree);
46 | }
47 | });
48 | return treesArr;
49 | },
50 | /**
51 | * 获取所有子节点
52 | * @param {*} node
53 | * @param {*} arr
54 | */
55 | getAllChildrenNode(node, arr) {
56 | const nodes = arr || [];
57 | if (node.children) {
58 | node.children.map(son => {
59 | this.getAllChildrenNode(son, nodes);
60 | });
61 | } else {
62 | nodes.push(node);
63 | }
64 |
65 | return nodes;
66 | },
67 | /**
68 | * 根据树节点title获取key
69 | * @param {*} titles [title1,title2...]
70 | */
71 | getKeyByTitle(titles) {
72 | let ts = Array.isArray(titles) ? titles : [].concat(titles);
73 | const alltrees = this.getAllTreeNodes();
74 | const keys = [];
75 | ts.map(title => {
76 | const treeNode = alltrees.find(node => {
77 | return node.title === title;
78 | });
79 | keys.push(treeNode.key);
80 | });
81 | return keys.filter(Boolean);
82 | },
83 | /**根据标题获取树节点
84 | *
85 | * @param {*} title
86 | */
87 | getTreeNodeByTitle(title) {
88 | const trees = this.getAllTreeNodes();
89 | const node = trees.find(tree => {
90 | return tree.title === title;
91 | });
92 | return node;
93 | },
94 | };
95 |
--------------------------------------------------------------------------------
/src/middleware/arcgis/sceneview/arcgis-sceneview.js:
--------------------------------------------------------------------------------
1 | import { jsapi } from '../../../constants/geomap-utils';
2 | import * as actions from '../../../constants/action-types';
3 | import widgets from '../../../utils/widgets';
4 | import { AppProxy, Portal, WebsceneID } from '../../../utils/env';
5 | const ags = {};
6 | window.agsGlobal = ags;
7 |
8 | // 设置esriconfig
9 | async function prepare() {
10 | const [esriConfig] = await jsapi.load(['esri/config']);
11 | // 设置跨域处理地址
12 | esriConfig.request.proxyUrl = AppProxy;
13 | // 设置portal地址
14 | esriConfig.portalUrl = Portal;
15 | }
16 |
17 | function createSceneView(opts = {}) {
18 | // Detect if 'createLogger' was passed directly to 'applyMiddleware'.
19 | if (opts.getState && opts.dispatch) {
20 | return () => next => action => next(action);
21 | }
22 |
23 | return store => next => async action => {
24 | switch (action.type) {
25 | //初始化地图
26 | case actions.INIT_WEBSCENE: {
27 | const { payload } = action;
28 | const { container } = payload;
29 |
30 | // DOM container not defined
31 | if (!container) break;
32 |
33 | // if sceneview container is already initialized, just add it back to the DOM.
34 | if (ags.container) {
35 | container.appendChild(ags.container);
36 | break;
37 | }
38 |
39 | // Otherwise, create a new container element and a new scene view.
40 | ags.container = document.createElement('div');
41 | container.appendChild(ags.container);
42 |
43 | await prepare();
44 |
45 | ags.view = await window.GeomapUtils.view.map3d.initSceneView(Portal, WebsceneID, ags.container);
46 | // 创建鹰眼微件
47 | await widgets.createOverView(ags.view);
48 |
49 | // after view created
50 | window.agsGlobal = ags;
51 |
52 | // When initialized...
53 | return ags.view.when(() => { });
54 | }
55 | case actions.ACTION_MAP_OVERVIEW: {
56 | const visibleOverviewmap = action.payload;
57 | const overmap = document.getElementById('overmapDiv');
58 | if (visibleOverviewmap) {
59 | overmap.style.display = 'block';
60 | } else {
61 | overmap.style.display = 'none';
62 | }
63 | break;
64 | }
65 | default: {
66 | next(action);
67 | break;
68 | }
69 | }
70 |
71 | return Promise.resolve();
72 | };
73 | }
74 |
75 | export { createSceneView };
76 |
--------------------------------------------------------------------------------