zh-mapbox 0.1.26 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -1
- package/dist/index.d.ts +34 -0
- package/dist/index.js +1 -1
- package/dist/index.js.LICENSE +24 -0
- package/package.json +9 -1
package/README.md
CHANGED
|
@@ -78,7 +78,7 @@ RegisterMapBoxModel(THREE,GLTFLoader)
|
|
|
78
78
|
| **loadSpriteGraph**(sprite)-(0.0.114) | sprite:{<br />image:string 图片地址<br />json:string\|object json数据<br />} | 加载精灵图 |
|
|
79
79
|
| **MapClusterMarker**(options)-(0.0.114) | options: marker参数 | 聚合marker |
|
|
80
80
|
| **MapSourceEvent**(name,options)-(0.0.114) | name:source<br />options:{<br />once:true 执行一次<br />sourceLayer: 图层源 vector时必传<br />filter:过滤<br />} | 获取source源信息 |
|
|
81
|
-
| **TileByGeoJson**(options)-(0.1.0) | options:{<br />maxZoom:18 最大层级<br />minZoom:0 最小层级<br />expand:0 扩展瓦片数<br />isGCJ:false 是否GCJ坐标<br />replaceUrl:Function 替换url<br />isJudgement:false 是否判断瓦片<br />judgementBox:Function 四至判断方法<br />judgementPoint:Function 坐标判断方法<br />filter:Function 设置滤镜<br/>coordTransform:Function 坐标转换<br/>judgeBound:true 是否先判断边界<br/>isPrecision:true
|
|
81
|
+
| **TileByGeoJson**(options)-(0.1.0) | options:{<br />maxZoom:18 最大层级<br />minZoom:0 最小层级<br />expand:0 扩展瓦片数<br />isGCJ:false 是否GCJ坐标<br />replaceUrl:Function 替换url<br />isJudgement:false 是否判断瓦片<br />judgementBox:Function 四至判断方法<br />judgementPoint:Function 坐标判断方法<br />filter:Function 设置滤镜<br/>coordTransform:Function 坐标转换<br/>judgeBound:true 是否先判断边界<br/>isPrecision:true 是否提升精度<br/>minShow:true 小于最小层级是否显示<br/>maxShow:true 大于最大层级是否显示<br/>textureType:'NEAREST'\|'LINEAR'图像混合模式} | 裁剪区域 |
|
|
82
82
|
| **MapMenu**(options)-(0.1.0) | options:{<br />move:false 菜单是否跟随移动<br />className:string <br />} | 右键菜单 |
|
|
83
83
|
| **MapMeasure**(options)-(0.1.1) | options:{...} | 地图测量 |
|
|
84
84
|
| **MapTileClusterCustom**(options)-(0.1.6) | options:{} | 切片聚合 |
|
|
@@ -299,6 +299,7 @@ options:
|
|
|
299
299
|
| **judgeSizeLngLat**(point,isLng) | point:经纬度数字<br />isLng:true 是否经度在前 | 反转经纬度 |
|
|
300
300
|
| **object2Geojson** | | 对象转geojson |
|
|
301
301
|
| **resversalGeojson** | | 反转geojson |
|
|
302
|
+
| **reversalGeojson** | | 反转geojson |
|
|
302
303
|
| **reversalLngLat** | | 反转多维经纬度 |
|
|
303
304
|
| **mergeGeoJson** | | 合并geojson |
|
|
304
305
|
| **getPositionType** | | 判断多维数组类型 |
|
|
@@ -314,6 +315,10 @@ options:
|
|
|
314
315
|
| **performChunk** | | 分片执行长任务 |
|
|
315
316
|
| **getGifSymbol** | | gif图标 |
|
|
316
317
|
| **getAPNGSymbol** | | apng图标 |
|
|
318
|
+
| **convertPolygonToLinePolygon** | | 面转成线面 |
|
|
319
|
+
| **pointNearOnLine** | | 距离目标点最近的线上的点 |
|
|
320
|
+
| **polygonCenter** | | 面中心点 |
|
|
321
|
+
| **invertMask** | | 反转区域 |
|
|
317
322
|
|
|
318
323
|
|
|
319
324
|
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,12 @@ export declare function reversalLngLat(position: string | any[], isLng?: boolean
|
|
|
48
48
|
* @param isLng 是否经度在前
|
|
49
49
|
*/
|
|
50
50
|
export declare function resversalGeojson(geojson: any, isLng?: boolean): any;
|
|
51
|
+
/**
|
|
52
|
+
* 反转geojson
|
|
53
|
+
* @param geojson
|
|
54
|
+
* @param isLng 是否经度在前
|
|
55
|
+
*/
|
|
56
|
+
export declare function reversalGeojson(geojson: any, isLng?: boolean): any;
|
|
51
57
|
|
|
52
58
|
/**
|
|
53
59
|
* mapbox symbol 图标
|
|
@@ -67,6 +73,7 @@ export declare function getSymbolRipple(options: { size: number, duration?: numb
|
|
|
67
73
|
* @param [options.duration] 动画时间 (null) gif原始间隔
|
|
68
74
|
*/
|
|
69
75
|
export declare function getGifSymbol(options: { width?: number, height?: number, url: string, duration?: number }): { width: number, height: number, data: any };
|
|
76
|
+
|
|
70
77
|
/**
|
|
71
78
|
* mapbox apngsymbol 图标
|
|
72
79
|
* @param options
|
|
@@ -110,6 +117,33 @@ export declare function deepClone(data: any): any;
|
|
|
110
117
|
*/
|
|
111
118
|
export declare function performChunk(datas: any[] | number, consumer: Function, chunkSplitor?: Function): any;
|
|
112
119
|
|
|
120
|
+
/**
|
|
121
|
+
* geojson 边界线转面
|
|
122
|
+
* @param geojson
|
|
123
|
+
* @param length
|
|
124
|
+
*/
|
|
125
|
+
export declare function convertPolygonToLinePolygon(geojson: any, length: number): any;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* 距离目标点最近的线上的点
|
|
129
|
+
* @param point
|
|
130
|
+
* @param lines
|
|
131
|
+
*/
|
|
132
|
+
export declare function pointNearOnLine(point: number[], lines: number[]): number[] | null;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* 获取面中心点
|
|
136
|
+
* @param geojson
|
|
137
|
+
*/
|
|
138
|
+
export declare function polygonCenter(geojson: any): any;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* 反转区域
|
|
142
|
+
* @param geojson
|
|
143
|
+
* @param position 默认全球
|
|
144
|
+
*/
|
|
145
|
+
export declare function invertMask(geojson: any, position?: number[][][]): any;
|
|
146
|
+
|
|
113
147
|
/**
|
|
114
148
|
* 创建一组地图图层
|
|
115
149
|
*/
|