Skip to content

Commit c451b48

Browse files
committed
同步v3.1.6代码
1 parent c86021f commit c451b48

File tree

105 files changed

+2759
-2711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+2759
-2711
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ showLoading(type) // 显示loading
272272
hideLoading(type) // 关闭loading
273273
```
274274

275-
完成后我们即可访问 [http://localhost:8080/editor.html?id=map/sample](http://localhost:8080/editor.html?id=map/sample)来查看示例的效果。
275+
完成后我们即可访问 [http://localhost:8080/editor-vue.html?id=map/sample](http://localhost:8080/editor-vue.html?id=map/sample)来查看示例的效果。
276276

277277

278278
### 4. (按需可选)配置其他依赖资源

package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@
33
"version": "3.1.0",
44
"description": "在Vue3技术栈下的Mars2D平台 功能示例 演示项目",
55
"scripts": {
6-
"serve": "vite --host",
76
"dev": "vite",
7+
"serve": "npm run clean-cache && vite --host",
88
"clean-cache": "rimraf node_modules/.cache/ && rimraf node_modules/.vite",
99
"clean-lib": "rimraf node_modules",
1010
"preview": "vite preview",
1111
"build": "npm run lint && vite build",
12+
"build2": "node --max_old_space_size=1024000 ./node_modules/vite/bin/vite.js build",
1213
"serve:dist": "http-server ./dist",
1314
"lint": "vue-tsc --noEmit --skipLibCheck && npm run eslint",
1415
"eslint": "eslint ./src/**/*.{js,vue,ts} --fix",
1516
"prepare": "husky install"
1617
},
1718
"dependencies": {
1819
"@icon-park/svg": "^1.4.0",
19-
"@marsgis/editor": "^1.1.3",
20+
"@marsgis/editor": "^1.1.4",
2021
"ant-design-vue": "^3.2.5",
2122
"axios": "^0.25.0",
2223
"core-js": "^3.20.3",
2324
"dayjs": "^1.10.7",
2425
"echarts": "^5.3.2",
2526
"localforage": "^1.10.0",
2627
"lodash": "^4.17.21",
27-
"mars2d": "~3.1.0",
28+
"mars2d": "^3.1.0",
2829
"monaco-editor": "^0.33.0",
2930
"nprogress": "^0.2.0",
3031
"serve": "^13.0.2",
@@ -81,7 +82,7 @@
8182
"keywords": [
8283
"marsgis",
8384
"mars2d",
84-
"cesium",
85+
"leaflet",
8586
"vue",
8687
"vue3",
8788
"gis",

public/lib/mars2d/mars2d.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* Mars2D地理信息平台 mars2d
33
*
4-
* 版本信息:v3.1.5
5-
* 编译日期:2022-08-01 19:35:35
4+
* 版本信息:v3.1.6
5+
* 编译日期:2022-09-15 20:29:34
66
* 版权所有:Copyright by 火星科技 http://mars2d.cn
77
* 使用单位:免费公开版 ,2021-10-01
88
*/

public/lib/mars2d/mars2d.d.ts

Lines changed: 115 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
/**
33
* Mars2D地理信息平台 mars2d
44
*
5-
* 版本信息:v3.1.5
6-
* 编译日期:2022-08-01 19:35:35
5+
* 版本信息:v3.1.6
6+
* 编译日期:2022-09-15 20:29:34
77
* 版权所有:Copyright by 火星科技 http://mars2d.cn
88
* 使用单位:免费公开版 ,2021-10-01
99
*/
@@ -1342,6 +1342,11 @@ declare class CanvasImage extends L.Path {
13421342
toGeoJSON(options?: any | {
13431343
precision?: number;
13441344
}): any | any;
1345+
/**
1346+
* 将矢量数据的坐标、样式及属性等信息导出为对象,可以用于存储。
1347+
* @returns 导出的坐标、样式及属性等信息
1348+
*/
1349+
toJSON(): any | any;
13451350
/**
13461351
* 设置图片URL
13471352
* @param url - 图片URL
@@ -1751,6 +1756,11 @@ declare class Circle extends L.Circle {
17511756
toGeoJSON(options?: any | {
17521757
precision?: number;
17531758
}): any | any;
1759+
/**
1760+
* 将矢量数据的坐标、样式及属性等信息导出为对象,可以用于存储。
1761+
* @returns 导出的坐标、样式及属性等信息
1762+
*/
1763+
toJSON(): any | any;
17541764
/**
17551765
* 判断指定坐标是否在当前圆内
17561766
* @param latlng - 坐标
@@ -1836,6 +1846,7 @@ declare namespace DivGraphic {
18361846
* @property [verticalOrigin] - 垂直方向的定位
18371847
* @property [offsetX] - horizontalOrigin定位基础上,横向方向偏移数值
18381848
* @property [offsetY] - verticalOrigin定位基础上,垂直方向偏移数值
1849+
* @property [iconSize] - icon图片的大小(单位:像素),设置后width、height即失效。
18391850
* @property [iconAnchor] - 自定义图标的“指示地理位置的锚点”的坐标(相对于其左上角)。 以便图标显示准确位于标记的地理位置。 如果指定大小,则iconAnchor默认为图标中心点,也可以在带有负边距的CSS中设置。设置后horizontalOrigin、verticalOrigin即失效。
18401851
* @property [className] - 自定义样式class名称
18411852
* @property [draggable = false] - 标记是否可以用鼠标/触摸拖动
@@ -1854,6 +1865,7 @@ declare namespace DivGraphic {
18541865
verticalOrigin?: VerticalOrigin;
18551866
offsetX?: number;
18561867
offsetY?: number;
1868+
iconSize?: L.Point | number[];
18571869
iconAnchor?: L.Point | number[];
18581870
className?: string;
18591871
draggable?: boolean;
@@ -2613,6 +2625,11 @@ declare class Ellipse extends L.Path {
26132625
toGeoJSON(options?: any | {
26142626
precision?: number;
26152627
}): any | any;
2628+
/**
2629+
* 将矢量数据的坐标、样式及属性等信息导出为对象,可以用于存储。
2630+
* @returns 导出的坐标、样式及属性等信息
2631+
*/
2632+
toJSON(): any | any;
26162633
/**
26172634
* 获取矩形边界
26182635
* @returns 矩形边界
@@ -3222,6 +3239,11 @@ declare class Marker extends L.Marker {
32223239
toGeoJSON(options?: any | {
32233240
precision?: number;
32243241
}): any | any;
3242+
/**
3243+
* 将矢量数据的坐标、样式及属性等信息导出为对象,可以用于存储。
3244+
* @returns 导出的坐标、样式及属性等信息
3245+
*/
3246+
toJSON(): any | any;
32253247
}
32263248

32273249
/**
@@ -3948,6 +3970,11 @@ declare class Point extends L.CircleMarker {
39483970
toGeoJSON(options?: any | {
39493971
precision?: number;
39503972
}): any | any;
3973+
/**
3974+
* 将矢量数据的坐标、样式及属性等信息导出为对象,可以用于存储。
3975+
* @returns 导出的坐标、样式及属性等信息
3976+
*/
3977+
toJSON(): any | any;
39513978
}
39523979

39533980
declare namespace Polygon {
@@ -4293,6 +4320,11 @@ declare class Polygon extends L.Polygon {
42934320
toGeoJSON(options?: any | {
42944321
precision?: number;
42954322
}): any | any;
4323+
/**
4324+
* 将矢量数据的坐标、样式及属性等信息导出为对象,可以用于存储。
4325+
* @returns 导出的坐标、样式及属性等信息
4326+
*/
4327+
toJSON(): any | any;
42964328
/**
42974329
* 判断指定坐标是否在当前面内
42984330
* @param latlng - 坐标
@@ -4635,6 +4667,11 @@ declare class Polyline extends L.Polyline {
46354667
toGeoJSON(options?: any | {
46364668
precision?: number;
46374669
}): any | any;
4670+
/**
4671+
* 将矢量数据的坐标、样式及属性等信息导出为对象,可以用于存储。
4672+
* @returns 导出的坐标、样式及属性等信息
4673+
*/
4674+
toJSON(): any | any;
46384675
/**
46394676
* 设置线的偏移值,常用于平行线
46404677
* @param offset - 偏移值(像素)
@@ -4996,6 +5033,11 @@ declare class Rectangle extends L.Rectangle {
49965033
toGeoJSON(options?: any | {
49975034
precision?: number;
49985035
}): any | any;
5036+
/**
5037+
* 将矢量数据的坐标、样式及属性等信息导出为对象,可以用于存储。
5038+
* @returns 导出的坐标、样式及属性等信息
5039+
*/
5040+
toJSON(): any | any;
49995041
/**
50005042
* 判断指定坐标是否在当前矩形内
50015043
* @param latlng - 坐标
@@ -6030,6 +6072,16 @@ declare class GraphicLayer extends L.FeatureGroup {
60306072
* @returns 右键菜单数组
60316073
*/
60326074
getContextMenu(): any | any;
6075+
/**
6076+
* 是否有绑定的右键菜单
6077+
* @returns 当前对象本身,可以链式调用
6078+
*/
6079+
hasContextMenu(): any | boolean;
6080+
/**
6081+
* 将图层转为Json简单对象,用于存储后再传参加载
6082+
* @returns Json简单对象
6083+
*/
6084+
toJSON(): any | any;
60336085
/**
60346086
* 将图层内的矢量数据转为GeoJSON格式对象
60356087
* @returns 返回GeoJSON格式对象(作为GeoJSON GeometryCollection)。
@@ -6085,6 +6137,16 @@ declare class GraphicLayer extends L.FeatureGroup {
60856137
easeLinearity?: number;
60866138
noMoveStart?: boolean;
60876139
}): any | GraphicLayer;
6140+
/**
6141+
* 是否存在Popup绑定
6142+
* @returns 是否存在Popup绑定
6143+
*/
6144+
hasPopup(): any | boolean;
6145+
/**
6146+
* 是否绑定了tooltip
6147+
* @returns 是否绑定
6148+
*/
6149+
hasTooltip(): any | boolean;
60886150
/**
60896151
* 开始绘制矢量数据,绘制的数据会加载在当前图层。
60906152
* @param options - Graphic构造参数,包含:
@@ -9171,6 +9233,11 @@ declare class Map extends L.Map {
91719233
* @returns 图层数组
91729234
*/
91739235
getTileLayers(): any | L.TileLayer[];
9236+
/**
9237+
* 获取默认右键菜单
9238+
* @returns 默认右键菜单数组
9239+
*/
9240+
getDefaultContextMenu(): any | any;
91749241
/**
91759242
* 绑定右键菜单幕
91769243
* @param arr - 菜单配置
@@ -10155,6 +10222,10 @@ declare class ArcGisDynamicLayer extends L.TileLayer {
1015510222
* 透明度
1015610223
*/
1015710224
opacity: number;
10225+
/**
10226+
* 显示隐藏状态
10227+
*/
10228+
show: boolean;
1015810229
/**
1015910230
* 用于向服务发出新请求并绘制响应。
1016010231
* @returns 当前对象本身,可以链式调用
@@ -10372,6 +10443,10 @@ declare class ArcGisFeatureLayer extends L.Layer {
1037210443
* 名称 标识
1037310444
*/
1037410445
name: string;
10446+
/**
10447+
* 显示隐藏状态
10448+
*/
10449+
show: boolean;
1037510450
/**
1037610451
* 遍历所有矢量数据并将其作为参数传递给回调函数
1037710452
* @example
@@ -10614,6 +10689,10 @@ declare class ArcGisImageLayer extends L.TileLayer {
1061410689
* 波段值
1061510690
*/
1061610691
bandIds: string | number[];
10692+
/**
10693+
* 显示隐藏状态
10694+
*/
10695+
show: boolean;
1061710696
}
1061810697

1061910698
/**
@@ -10739,6 +10818,10 @@ declare class ArcGisTileLayer extends L.TileLayer {
1073910818
* 名称 标识
1074010819
*/
1074110820
name: string;
10821+
/**
10822+
* 显示隐藏状态
10823+
*/
10824+
show: boolean;
1074210825
}
1074310826

1074410827
/**
@@ -12314,6 +12397,12 @@ declare namespace PointTrans {
1231412397
* @returns LatLng坐标值数组
1231512398
*/
1231612399
function mercators2latlngs(arr: any[][]): any | L.LatLng[];
12400+
/**
12401+
* WebMercator投影平面坐标数组 转为 LatLng坐标值数组
12402+
* @param point - WebMercator投影平面坐标数组
12403+
* @returns LatLng坐标值数组
12404+
*/
12405+
function mercator2latlng(point: any[]): any | L.LatLng;
1231712406
/**
1231812407
* 经度/纬度 十进制 转为 度分秒格式
1231912408
* @param value - 经度或纬度值
@@ -12472,6 +12561,14 @@ declare namespace PointUtil {
1247212561
* @returns 新的坐标
1247312562
*/
1247412563
function interpolatePosition(p1: L.LatLng, p2: L.LatLng, all: number, curr: number): any | L.LatLng;
12564+
/**
12565+
* 计算指定角度和距离处的点
12566+
* @param center - 现有点
12567+
* @param distance - 距离
12568+
* @param angle - 角度
12569+
* @returns 目前点
12570+
*/
12571+
function getPointByDistanceAngle(center: L.LatLng, distance: number, angle: number): any | L.LatLng;
1247512572
}
1247612573

1247712574
/**
@@ -12494,6 +12591,22 @@ declare namespace PolyUtil {
1249412591
* @returns 平行线坐标数组
1249512592
*/
1249612593
function getOffsetPoints(pts: L.LatLng[], offset: number): any | L.LatLng[];
12594+
/**
12595+
* 计算圆的边线坐标列表
12596+
* @param center - 中心点
12597+
* @param radius - 半径
12598+
* @param [count = 100] - 点个数
12599+
* @returns 边界线坐标数组
12600+
*/
12601+
function getCircleOutlineLatlngs(center: L.LatLng, radius: number, count?: number): any | L.LatLng[];
12602+
/**
12603+
* 在 指定bbox区域 内生成 指定数量(概略) 的网格坐标点,
12604+
* 目前常用于生成坐标点,测试数据量
12605+
* @param bounds - 区域范围
12606+
* @param count - 数量(概略),返回坐标接近此数字
12607+
* @returns 坐标集合 ,如: {points:[LngLatPoint,LngLatPoint], size: 500 }
12608+
*/
12609+
function getGridPoints(bounds: L.LatLngBounds, count: number): any | any;
1249712610
}
1249812611

1249912612
/**

public/lib/mars2d/mars2d.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/lib/mars2d/plugins/echarts/mars2d-echarts.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/lib/mars2d/plugins/esri/mars2d-esri.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/lib/mars2d/plugins/mapv/mars2d-mapv.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/mars-sample/data-manage.vue

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
11
<template>
2-
<a-space>
3-
<span class="mars-dialog-item-label">数据管理:</span>
4-
<mars-button @click="onClickClear">清除</mars-button>
5-
<mars-button @click="onClickExpFile" title="保存GeoJSON">
6-
<mars-icon icon="save" class="icon-vertical-a" />
7-
保存
8-
</mars-button>
9-
<a-upload
10-
:multiple="false"
11-
name="file"
12-
accept="json,geojson"
13-
:file-list="fileList"
14-
:showUploadList="false"
15-
:supportServerRender="true"
16-
:beforeUpload="beforeUploade"
17-
@change="onClickImpFile"
18-
>
19-
<mars-button title="打开GeoJSON">
20-
<mars-icon icon="upload-one" class="icon-vertical-a" />
21-
打开
22-
</mars-button>
23-
</a-upload>
24-
</a-space>
2+
<a-row>
3+
<a-col :span="5">
4+
<span class="mars-dialog-item-label">数据管理:</span>
5+
</a-col>
6+
<a-col :span="19">
7+
<a-space>
8+
<mars-button @click="onClickClear">清除</mars-button>
9+
<mars-button @click="onClickExpFile" title="保存GeoJSON">
10+
<mars-icon icon="save" class="icon-vertical-a" />
11+
保存
12+
</mars-button>
13+
<a-upload
14+
:multiple="false"
15+
name="file"
16+
accept="json,geojson"
17+
:file-list="fileList"
18+
:showUploadList="false"
19+
:supportServerRender="true"
20+
:beforeUpload="beforeUploade"
21+
@change="onClickImpFile"
22+
>
23+
<mars-button title="打开GeoJSON">
24+
<mars-icon icon="upload-one" class="icon-vertical-a" />
25+
打开
26+
</mars-button>
27+
</a-upload>
28+
<slot></slot>
29+
</a-space>
30+
</a-col>
31+
</a-row>
2532
</template>
2633

2734
<script setup lang="ts">

0 commit comments

Comments
 (0)