方法
求坐标数组的中心点
参数名称 | 类型 | 默认值 | 描述信息 |
---|---|---|---|
latlngs |
Array.<L.LatLng> |
坐标数组 |
|
crs |
CRS | L.CRS | String | Object |
"EPSG:3857"
|
坐标系 |
返回值:
中心点坐标
static mars2d.PolyUtil.getCircleOutlineLatlngs(center, radius, count) → Array.<L.LatLng>
util/PolyUtil.js 216
计算圆的边线坐标列表
参数名称 | 类型 | 默认值 | 描述信息 |
---|---|---|---|
center |
L.LatLng |
中心点 |
|
radius |
Number |
半径 |
|
count |
Number |
100
|
可选
点个数 |
返回值:
边界线坐标数组
在 指定bbox区域 内生成 指定数量(概略) 的网格坐标点, 目前常用于生成坐标点,测试数据量
参数名称 | 类型 | 描述信息 |
---|---|---|
bounds |
L.LatLngBounds |
区域范围 |
count |
Number |
数量(概略),返回坐标接近此数字 |
返回值:
坐标集合 ,如: {points:[LngLatPoint,LngLatPoint], size: 500 }
计算平行线坐标
参数名称 | 类型 | 描述信息 |
---|---|---|
pts |
Array.<L.LatLng> |
坐标数组 |
offset |
Number |
偏移值 |
返回值:
平行线坐标数组
判断点是否 多边形内
参数名称 | 类型 | 描述信息 |
---|---|---|
latlng |
L.LatLng |
需要判断的点位 |
latlngs |
Array.<L.LatLng> |
多边形的边界点 |
返回值:
是否在面内
检查两条线段是否相交
参数名称 | 类型 | 描述信息 |
---|---|---|
p |
L.Point | Array.<Number> |
线段1起点 |
p1 |
L.Point | Array.<Number> |
线段1终点 |
p2 |
L.Point | Array.<Number> |
线段2起点 |
p3 |
L.Point | Array.<Number> |
线段2终点 |
返回值:
两条线段是否相交