Class: FMCalculator

FMCalculator

FMCalculator 基础的计算类

new fengmap.FMCalculator()

Methods

staticfengmap.FMCalculator.Contain(polygon, point)

判断点是否在多边形内

Name Type Description
polygon object

多边形

point object

点坐标

Name Type Description
x number

指定点x坐标

y number

指定点y坐标

staticfengmap.FMCalculator.GetArea(polygon)

计算面积

Name Type Description
polygon object

多边形

staticfengmap.FMCalculator.GetLength(start, end)

计算长度

Name Type Description
start object

起点

Name Type Description
x number

起点的x坐标

y number

起点的y坐标

end object

终点

Name Type Description
x number

终点x坐标

y number

终点y坐标

staticfengmap.FMCalculator.MercatorToWGS84(Mercator)

墨卡托坐标转WGS84

Name Type Description
Mercator object
Name Type Description
x number

指定点x坐标

y number

指定点y坐标

staticfengmap.FMCalculator.WGS84ToWebMercator(lonLat)

WGS84转墨卡托坐标

Name Type Description
lonLat object
Name Type Description
x number

指定点经度坐标

y number

指定点纬度坐标