zh-mapbox 0.1.71 → 0.1.74

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 CHANGED
@@ -92,6 +92,7 @@ RegisterMapBoxModel(THREE,GLTFLoader)
92
92
  | **MapSelectBox**(options)-(0.1.60) | options:{} | 地图框选 |
93
93
  | **isPointOnEarth**(lnglat,strict)-(0.1.60) | lnglat:{<br>lng:number,<br>lat:number}<br>strict:boolean 更严格的判断[false] | 点是否在地图上 |
94
94
  | **AnimateMarker**()-(0.1.66) | | 图标动画 |
95
+ | **MapMoreLayer**()-(0.1.74) | | 绘制图层 |
95
96
 
96
97
  ### Map.Style
97
98
 
@@ -276,17 +277,20 @@ options:
276
277
  fill: { //填充属性
277
278
  color: string //颜色
278
279
  } ,
279
- calcAll:boolean //鼠标移动计算总距离/与上一点距离
280
+ calcAll:boolean, //鼠标移动计算总距离/与上一点距离
281
+ showLabel:boolean,//是否显示标签
282
+ showArea:boolean,//是否显示面积标签
280
283
  }
281
284
  ```
282
285
 
283
- | 方法名 | 参数 | 描述 |
284
- | ------------------- | --------------------- | -------- |
285
- | **draw**(callback?) | callback 绘制完成回调 | 开启绘制 |
286
- | **off**() | | 停止监听 |
287
- | **remove**() | | 清除绘制 |
288
- | **visible**(show) | show:boolean | 显示隐藏 |
289
- | **destroy**() | | 销毁 |
286
+ | 方法名 | 参数 | 描述 |
287
+ | ------------------- | --------------------- | ------------ |
288
+ | **draw**(callback?) | callback 绘制完成回调 | 开启绘制 |
289
+ | **off**() | | 停止监听 |
290
+ | **remove**() | | 清除绘制 |
291
+ | **visible**(show) | show:boolean | 显示隐藏 |
292
+ | **destroy**() | | 销毁 |
293
+ | **getJson**() | | 获取测量结果 |
290
294
 
291
295
  ##### **MapTileClusterCustom**
292
296
 
@@ -384,6 +388,33 @@ options:{
384
388
  | **stop**() | | 停止动画 |
385
389
  | **destroy**() | | 销毁 |
386
390
 
391
+ ##### MapMoreLayer
392
+
393
+ ```js
394
+ sourceConfig:{
395
+ id,
396
+ ...
397
+ }
398
+ layerConfig:{
399
+ id,
400
+ beforeId,
401
+ ...
402
+ }
403
+ layerConfig:[
404
+ {},
405
+ {}
406
+ ]
407
+
408
+ ```
409
+
410
+
411
+
412
+ | 方法名 | 参数 | 描述 |
413
+ | ----------------------------------- | ------------------------------------------ | -------- |
414
+ | **draw**( sourceConfig,layerConfig) | sourceConfig源配置<br>layerConfig 图层配置 | 开启绘制 |
415
+ | **visible**(show) | show:boolean | 显示隐藏 |
416
+ | **destroy**() | | 销毁 |
417
+
387
418
  #### 公共方法
388
419
 
389
420
  | 方法名 | 参数 | 描述 |
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  /**
3
2
  * 注册Mapbox扩展方法
4
3
  * @param {Object} mapbox - Mapbox对象
@@ -749,10 +748,11 @@ declare module 'mapbox-gl' {
749
748
  * - remove(): 清除测量
750
749
  * - visible(show): 显示隐藏
751
750
  * - destroy(): 销毁测量工具
751
+ * - getJson(): 获取测量结果
752
752
  * @param options 配置选项
753
753
  * @returns MapMeasure 实例
754
754
  */
755
- MapMeasure(options?: { type?: 'line' | 'circle' | 'polygon' | 'rect' | 'sector', fixed?: number | Array<number>, dash?: boolean, units?: { line?: [string, string], circle?: [string, string], polygon?: [string, string], rect?: [string, string], sector?: [string, string] }, className?: string, point?: { color?: string, radius?: number, strokeWidth?: number, strokeColor?: string }, pointMove?: { opacity?: number, color?: string, radius?: number, strokeWidth?: number, strokeColor?: string, strokeOpacity?: number }, line?: { color?: string, width?: number, dasharray?: [number, number] }, fill?: { color?: string }, calcAll?: boolean }): any;
755
+ MapMeasure(options?: { type?: 'line' | 'circle' | 'polygon' | 'rect' | 'sector', fixed?: number | Array<number>, dash?: boolean, units?: { line?: [string, string], circle?: [string, string], polygon?: [string, string], rect?: [string, string], sector?: [string, string] }, className?: string, point?: { color?: string, radius?: number, strokeWidth?: number, strokeColor?: string }, pointMove?: { opacity?: number, color?: string, radius?: number, strokeWidth?: number, strokeColor?: string, strokeOpacity?: number }, line?: { color?: string, width?: number, dasharray?: [number, number] }, fill?: { color?: string }, calcAll?: boolean, showLabel?: boolean, showArea?: boolean }): any;
756
756
 
757
757
  /**
758
758
  * 创建瓦片聚合自定义图层
@@ -856,5 +856,14 @@ declare module 'mapbox-gl' {
856
856
  * - destroy(): 销毁
857
857
  */
858
858
  AnimateMarker(): any;
859
+
860
+ /**
861
+ * 添加图层
862
+ * 返回 MapMoreLayer 实例,提供以下方法:
863
+ * - draw(sourceConfig,layerConfig): 开始绘制
864
+ * - visible(show): 设置可见性
865
+ * - destroy(): 销毁
866
+ **/
867
+ MapMoreLayer(): any;
859
868
  }
860
869
  }