Class GeometryService

几何服务封装类,通过后台服务创建缓冲区 WS.GeometryService

http://[host]:[port]/rest/GeometryService/defaultService

Methods

  • 设置错误回调函数,当生成缓冲发生错误时会调用该函数。

    Parameters

    • callback: Function

      该回调函数有1个参数,表示错误信息

    Returns void

  • 调用后台服务,生成一个缓冲区

    Parameters

    • geom: object

      GeoJSONGeometry,原始几何对象,

    • distance: number

      缓冲距离,单位为米

    • callback: Function

      该回调函数有1个参数,第1个参数为Polygon类型

    Returns void

  • 调用后台服务,同时生成多个缓冲区

    Parameters

    • geoms: object[]

      GeoJSONGeometry数组,原始几何对象

    • distances: number[]

      缓冲距离,单位米。每个几何对象单独指定缓冲距离。

    • callback: Function

      该回调函数有1个参数,第1个参数为GeoJSONPolygon数组

    Returns void