Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
187 commits
Select commit Hold shift + click to select a range
fb86734
update 2.0
Dec 24, 2018
fd22bd5
add structure introduction
Dec 24, 2018
d2d4963
update 2.1
Dec 26, 2018
b72f011
add summary
Dec 26, 2018
080fb19
github测试提交
lihubadboy Jun 12, 2019
90e5cc2
update geomap
Jun 12, 2019
ed8c6af
test change
Jun 12, 2019
0398e06
添加数据选择
Pensiveant Jun 12, 2019
1e37377
将打印和截屏工具子菜单移动到结果输出工具栏菜单下
travelclover Jun 13, 2019
f96f4bc
将工具栏书签按钮移动到工具箱下
travelclover Jun 13, 2019
50607dd
解决点击书签报错的BUG
travelclover Jun 13, 2019
df20cb9
解决添加书签后输入空不清空的问题以及编辑书签时书签名不回填的问题
travelclover Jun 13, 2019
fc1755a
解决项目启动后报某些字段type错误的BUG
travelclover Jun 13, 2019
c7d896f
截屏界面圆角按钮改为直角按钮
travelclover Jun 13, 2019
8070bc8
去掉全域划分功能
lihubadboy Jun 13, 2019
b2a1a9f
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 13, 2019
6b732ff
分屏添加数据选择
Jun 13, 2019
6b67b9f
修改切换路径导航的bug
Jun 13, 2019
f651a0c
ToolBar字体样式
Jun 13, 2019
5e34c3f
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 13, 2019
3dc13e4
change icon
Jun 13, 2019
cdc58a6
去掉多时相代码
lihubadboy Jun 13, 2019
bd50268
删除冗余代码
lihubadboy Jun 13, 2019
fc397f5
数据选择
Jun 13, 2019
abe6e97
修改toolbar2d下拉框样式
lihubadboy Jun 13, 2019
c8ef41b
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 13, 2019
e6451ca
数据选择
Jun 13, 2019
687e594
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 13, 2019
2bff2fe
修改toolbar2d下拉框样式
lihubadboy Jun 13, 2019
18b87b1
删除冗余组件
lihubadboy Jun 13, 2019
6cd39e9
标绘添加
Pensiveant Jun 13, 2019
1d43534
标绘添加
Pensiveant Jun 13, 2019
bb4566a
解决冲突
Pensiveant Jun 13, 2019
fc72d0f
upgrade package versions
Jun 14, 2019
fa12c70
update eslint & umi config
Jun 14, 2019
4f52516
update umi config
Jun 14, 2019
8b43b70
工具箱下的测距功能增加关闭按钮
travelclover Jun 14, 2019
e156a47
增加示例模块
lihubadboy Jun 14, 2019
4cc3293
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 14, 2019
12e266c
工具箱下的测面功能增加关闭按钮
travelclover Jun 14, 2019
4ecc53b
疑点标绘清除添加
Pensiveant Jun 14, 2019
d5b260d
Merge branch 'master' of github.com:esrichina/geomap
Pensiveant Jun 14, 2019
b24a3e9
清除图层添加
Pensiveant Jun 14, 2019
7d20120
删除示例代码
lihubadboy Jun 15, 2019
a641d75
删除冗余代码
lihubadboy Jun 15, 2019
08d70e0
代码重构--中间件--mapview
lihubadboy Jun 15, 2019
5931385
删除冗余代码
lihubadboy Jun 15, 2019
687b308
调整代码结构-mapviewUtil
lihubadboy Jun 16, 2019
996eb44
重构basemap组件
lihubadboy Jun 16, 2019
dbc604c
底图切换功能重构
lihubadboy Jun 17, 2019
8904d5e
二维右侧工具栏修改
Jun 17, 2019
178d047
3D测量代码增加注释
travelclover Jun 17, 2019
e46a04f
commit measure line 2d
Jun 17, 2019
6e094dc
merge conflint
Jun 17, 2019
8fe1c58
3D光照、面积测量、打印添加注释
Pensiveant Jun 17, 2019
4e8821d
疑点标绘UI调整
Jun 17, 2019
a73c0e9
1
Jun 17, 2019
e6c9013
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 17, 2019
d4edcb6
二维测面重构
lihubadboy Jun 17, 2019
1220a7b
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 17, 2019
7620b8d
清除所有图层
Jun 17, 2019
39317b0
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 17, 2019
8d2b55b
地图图例功能重构
lihubadboy Jun 17, 2019
bccf9eb
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 17, 2019
a877074
删除图例功能
lihubadboy Jun 17, 2019
85e07bd
搜索框路线修改
Jun 17, 2019
ea58b90
三维距离测量重构
travelclover Jun 17, 2019
6ede733
更新Router Component的引用
Jun 17, 2019
a123c24
三维面积测量微件代码重构
travelclover Jun 17, 2019
39fcb0f
放大缩小功能组件重构
lihubadboy Jun 17, 2019
7deda82
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 17, 2019
201b49d
经纬度显示组件重构
lihubadboy Jun 17, 2019
e8547bc
日照分析重构
Pensiveant Jun 17, 2019
c64eae7
Merge branch 'master' of github.com:esrichina/geomap
Pensiveant Jun 17, 2019
597a0b7
3D鹰眼图组件改为纯函数的形式
travelclover Jun 17, 2019
fafa35d
导出底图重构
Pensiveant Jun 17, 2019
aaff9c0
Merge branch 'master' of github.com:esrichina/geomap
Pensiveant Jun 17, 2019
0a0f39d
经纬度显示微件
lihubadboy Jun 17, 2019
a4ba98f
修改3D距离测量默认单位
travelclover Jun 17, 2019
0eef9c9
路径规划代码重构
Jun 17, 2019
f9e8af5
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 17, 2019
30a5c15
提交
lihubadboy Jun 17, 2019
0245dd1
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 17, 2019
564a132
日照分析添加注释
Pensiveant Jun 17, 2019
4585a97
Merge branch 'master' of github.com:esrichina/geomap
Pensiveant Jun 17, 2019
59ae967
导出地图添加注释
Pensiveant Jun 17, 2019
eac5b65
路线导航代码重构
Jun 18, 2019
72a72fd
更新compass
lihubadboy Jun 18, 2019
9c44082
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 18, 2019
823b592
疑点标绘、数据选择重构
Jun 18, 2019
e21a0b7
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 18, 2019
8395878
compass功能重构
lihubadboy Jun 18, 2019
c1dbabe
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 18, 2019
e2d73ff
经纬度代码重构
lihubadboy Jun 18, 2019
557bdd8
书签功能重构
Pensiveant Jun 18, 2019
78a7820
Merge branch 'master' of github.com:esrichina/geomap
Pensiveant Jun 18, 2019
134182b
Merge branch 'master' of github.com:esrichina/geomap
Pensiveant Jun 18, 2019
61335ce
卷帘分屏对比添加注释
Jun 18, 2019
c491e02
解决和并冲突
Jun 18, 2019
b8f68f3
二三维切换功能重构
lihubadboy Jun 18, 2019
46c5f28
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 18, 2019
dc73764
删除basema过去组件
lihubadboy Jun 18, 2019
d9b469f
卷帘模块移出
Jun 18, 2019
63854e1
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 18, 2019
51336ae
增加三维uitls
lihubadboy Jun 18, 2019
5861edc
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 18, 2019
d702fbe
删除无用中间件
lihubadboy Jun 18, 2019
5c437cc
多时相重构
Jun 18, 2019
005a9bd
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 18, 2019
448b80b
1
Jun 18, 2019
c531c1e
删除书签无用组件
lihubadboy Jun 18, 2019
58b0ba9
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 18, 2019
68925f3
重构环绕漫游功能
lihubadboy Jun 18, 2019
e0fec90
分屏模块移出
Jun 18, 2019
52aa659
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 18, 2019
b9047e0
二维打印重构
Jun 18, 2019
16a8815
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 18, 2019
918f2d0
去掉左下角坐标console
Jun 18, 2019
2936096
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 18, 2019
46b1b19
增加通用方法
lihubadboy Jun 18, 2019
1e77f4d
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 18, 2019
1823e84
Toolbar2D重构
Pensiveant Jun 19, 2019
573fa29
解决冲突
Pensiveant Jun 19, 2019
5104096
Toolbar3D重构
Pensiveant Jun 19, 2019
eff767b
光照阴影之前文件的文件名修改为加old
Pensiveant Jun 19, 2019
eccea90
agsmap中注释掉日照分析相关model
Pensiveant Jun 19, 2019
1b46604
标绘、图层添加注释
Jun 19, 2019
6359a95
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 19, 2019
7a0908f
fix search errors
Jun 19, 2019
25c7a31
Merge branch 'master' of github.com:esrichina/geomap
Jun 19, 2019
9e9eca4
解决日照分析slider不同步的BUG
travelclover Jun 19, 2019
c0a61b0
删除多余toolbar文件
lihubadboy Jun 19, 2019
0a34b81
截屏微件重构
Jun 20, 2019
c21c4d0
Merge branch 'master' of https://github.com/esrichina/geomap
Jun 20, 2019
c1cf68a
增加雨雪天地效果
lihubadboy Jun 21, 2019
c16f419
Merge branch 'master' of https://github.com/esrichina/geomap
lihubadboy Jun 21, 2019
e62f561
测试添加新的三维路由
lihubadboy Jun 21, 2019
21a5641
更新
lihubadboy Jul 1, 2019
43219c9
提交
lihubadboy Jul 1, 2019
8d10d57
sceneViewer增加ToolbarLeft组件
travelclover Jul 1, 2019
f1df7cc
更新三维目录
lihubadboy Jul 1, 2019
2fb0a9f
sceneViewer去掉Toolbar3D组件
travelclover Jul 1, 2019
c5bc9da
sceneViewer相关组件文件夹结构调整
travelclover Jul 1, 2019
f9655fe
更新二维结构
lihubadboy Jul 1, 2019
3166f9e
更新二维结构
lihubadboy Jul 1, 2019
ab6b04e
更新二维的代码结构
lihubadboy Jul 1, 2019
9fdeae6
添加创建三维方法功能
lihubadboy Jul 1, 2019
e0ed651
代码重构中
lihubadboy Jul 1, 2019
06a0dad
删除无用组件
lihubadboy Jul 1, 2019
a257a87
2D地图增加底图切换功能
travelclover Jul 1, 2019
800beba
更新组件信息
lihubadboy Jul 2, 2019
ba11c75
二维首页注释添加
lihubadboy Jul 2, 2019
a2a3dd5
sceneViewer下增加修改数据源按钮
travelclover Jul 2, 2019
ab979b9
sceneViewer下增加搜索按钮
travelclover Jul 2, 2019
1733753
sceneViewer下增加框选按钮
travelclover Jul 2, 2019
826538a
数据源切换功能
Jul 2, 2019
f94f189
合并冲突
Jul 2, 2019
8040955
sceneViewer下增加切换底图按钮
travelclover Jul 2, 2019
1ef9d4b
sceneViewer下增加光照阴影按钮
travelclover Jul 2, 2019
0f70420
修改观照阴影面板的定位方式
travelclover Jul 2, 2019
fe155d2
sceneViewer下增加分析按钮
travelclover Jul 2, 2019
19f7a7e
将sceneViewer下光照阴影弹窗面板样式修改为和其他面板样式统一
travelclover Jul 3, 2019
a56297d
优化sceneViewer下光照阴影组件并解决该组件BUG
travelclover Jul 4, 2019
2c9fa7a
删除sceneViewer下不用的组件
travelclover Jul 5, 2019
eb0de04
sceneViewer下底图切换组件UI调整
travelclover Jul 5, 2019
0839b7d
更新toolbar样式
lihubadboy Jul 5, 2019
38e68be
切换数据源
Jul 5, 2019
ef198ba
Merge branch 'master' of https://github.com/esrichina/geomap
Jul 5, 2019
6cc9d3d
Merge branch 'master' of https://github.com/esrichina/geomap
Jul 5, 2019
7b65f9b
图标替换
Jul 5, 2019
8003566
解决sceneViewer下底图切换功能BUG:
travelclover Jul 5, 2019
e727cd8
切换图片
lihubadboy Jul 5, 2019
7437a7b
更新右侧图标
lihubadboy Jul 5, 2019
0961edb
更新图标
lihubadboy Jul 5, 2019
ef20731
修改sceneViewer下底图切换组件的UI
travelclover Jul 5, 2019
5a4393e
切换成GeomapUitls方法
lihubadboy Jul 14, 2019
21f19a9
更改文件地址
lihubadboy Jul 14, 2019
814ff3b
更新数据来源代码
lihubadboy Jul 14, 2019
e4ba9a5
加入portal中场景
lihubadboy Jul 14, 2019
b92f46b
修改数据源功能调整
Jul 17, 2019
eb65063
添加点击图片获取itemid的方法
Jul 18, 2019
55e355d
fixed ie
Aug 7, 2019
559d546
Merge branch 'master' of https://github.com/esrichina/geomap
Aug 7, 2019
f4bef04
Merge branch 'master' of https://github.com/esrichina/geomap
Aug 7, 2019
f930751
add jquery
Aug 7, 2019
18fcbae
2维测距测面集成到一个面板
Aug 22, 2019
fc78df2
1
Aug 22, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 11 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
{
"extends": "eslint-config-geomap"
"extends": "eslint-config-umi",
"plugins": [
"react-hooks"
],
"globals": {
"echarts": true,
"THREE": true
},
"rules": {
"react-hooks/rules-of-hooks": "error"
}
}
17 changes: 0 additions & 17 deletions .gitattributes

This file was deleted.

7 changes: 5 additions & 2 deletions .umirc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ export default {
targets: {
ie: 11,
},
exportStatic: {
htmlSuffix: true,
dynamicRoot: true,
},
plugins: [
// new InterpolateHtmlPlugin(HtmlWebpackPlugin, {
// PUBLIC_URL: publicUrl,
Expand Down Expand Up @@ -40,6 +44,5 @@ export default {
hardSource: false,
},
],
],
browserslist: ['> 1%', 'last 2 versions'],
]
};
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,55 @@
# geomap
# Geomap
BY esrichina

> **Note**: Geomap是一个高可重用,标准化和可扩展的前端Web GIS应用开发框架。该框架已经在ESRI中国平台实施部门内部推广使用,成功支撑了数个项目的应用开发需求,并得到客户的良好反馈。我们希望Geomap框架可以给使用ArcGIS平台的开发者们提供一些帮助。

## 1. 功能特色
- [1.1](#folder--struct) **风格统一的地图操作工具**

Geomap基于React封装了一系列的工具类微件,相比原生ArcGIS JSAPI中提供了更加丰富的选择,同时,所有的微件样式保持统一。

- [1.2](#folder--struct) **可复用的GIS应用功能**

Geomap提供了组件化封装的一系列GIS常用的应用功能,包括二三维地图中的标注与地图纠错,配置省、市、县三级行政区划定位,以及对接天地图的API实现了POI、公交换乘、路径规划等功能。

- [1.3](#folder--struct) **基于Portal的登录/认证**

Geomap实现了基于ArcGIS Portal的用户登录以及基于OAuth2的ClientID验证。

- [1.4](#folder--struct) **动态的图层服务树**

Geomap实现了基于Portal Item的动态图层服务树,以及各图层的开关。

- [1.5](#folder--struct) **GP分析工具**

Geomap实现了基于ArcGIS JSAPI 4.x调用ArcGIS GP分析Rest接口的功能,并以密度分析功能为例,实现了完整的GP分析应用交互流程。


## 2. 目录结构
- [2.1](#folder--struct) **工程目录**

```bash
├── dist # 输出目录
├── public # dev server根目录, contentBase(打包后会完整copy到dist,不经过webpack处理)
├── config # 全局配置文件
├── libs # 其他3rd libs
├── images # 直接通过相对路径引用的图片资源文件,包括PictureMarkerSymbol
├── src # 源代码目录
├── assets # 全局资源文件(会经由webpack打包,其中小于10kb的图片会转换为内联的二进制数据)
├── components # React UI 组件
├── middlewares # Redux 中间件
├── models # Dva models
├── pages # Umi pages
├── services # Used for communicate with server
└── utils # Utils
└── request.js # A util wrapped dva/fetch
├── app.js # Entry file
├── global.css # 全局CSS文件入口
├── .env # Node 自定义 Environment参数
├── .eslintignore #
├── .eslintrc # Eslint config
├── .gitignore #
├── .prettierrc # prettier config
├── .umirc.js # Umi config
└── package.json #
```
89 changes: 89 additions & 0 deletions build/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
const fs = require("fs");
const path = require("path");
const zlib = require("zlib");
const uglify = require("uglify-js");
const rollup = require("rollup");
const configs = require("./config");

if (!fs.existsSync("dist")) {
fs.mkdirSync("dist");
}

build(configs);

function build(builds) {
let built = 0;
const total = builds.length;
const next = () => {
buildEntry(builds[built])
.then(() => {
built++;
if (built < total) {
next();
}
})
.catch(logError);
};

next();
}

function buildEntry({ input, output }) {
const isProd = /min\.js$/.test(output.file);
return rollup
.rollup(input)
.then(bundle => bundle.generate(output))
.then(({ code }) => {
if (isProd) {
const minified = uglify.minify(code, {
output: {
preamble: output.banner,
/* eslint-disable camelcase */
ascii_only: true
/* eslint-enable camelcase */
}
}).code;
return write(output.file, minified, true);
} else {
return write(output.file, code);
}
});
}

function write(dest, code, zip) {
return new Promise((resolve, reject) => {
function report(extra) {
console.log(
blue(path.relative(process.cwd(), dest)) +
" " +
getSize(code) +
(extra || "")
);
resolve();
}

fs.writeFile(dest, code, err => {
if (err) return reject(err);
if (zip) {
zlib.gzip(code, (err, zipped) => {
if (err) return reject(err);
report(" (gzipped: " + getSize(zipped) + ")");
});
} else {
report();
}
});
});
}

function getSize(code) {
return (code.length / 1024).toFixed(2) + "kb";
}

function logError(e) {
console.log(e);
}

function blue(str) {
return "\x1b[1m\x1b[34m" + str + "\x1b[39m\x1b[22m";
}
71 changes: 71 additions & 0 deletions build/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
const path = require('path');
const buble = require('rollup-plugin-buble');
const flow = require('rollup-plugin-flow-no-whitespace');
const cjs = require('rollup-plugin-commonjs');
const node = require('rollup-plugin-node-resolve');
const replace = require('rollup-plugin-replace');

const version = process.env.VERSION || require('../package.json').version;

const banner = `/*!
* geomap-utils v${version}
* (c) ${new Date().getFullYear()} Esri China PS
* @license MIT
*/`;

const resolve = _path => path.resolve(__dirname, '../', _path);

module.exports = [
{
file: resolve('dist/geomap-utils.js'),
format: 'umd',
env: 'development',
},
{
file: resolve('dist/geomap-utils.min.js'),
format: 'umd',
env: 'production',
},
{
file: resolve('dist/geomap-utils.common.js'),
format: 'cjs',
},
{
file: resolve('dist/geomap-utils.esm.js'),
format: 'es',
},
].map(genConfig);

function genConfig(opts) {
const config = {
input: {
input: resolve('index.js'),
plugins: [
flow(),
node(),
cjs(),
replace({
__VERSION__: version,
}),
buble(),
],
},
output: {
file: opts.file,
format: opts.format,
banner,
name: 'GeomapUtils',
},
external: ['esri-loader'],
};

if (opts.env) {
config.input.plugins.unshift(
replace({
'process.env.NODE_ENV': JSON.stringify(opts.env),
})
);
}

return config;
}
3 changes: 3 additions & 0 deletions build/rollup.dev.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { input, output } = require("./config")[0];

module.exports = Object.assign({}, input, { output });
Loading