ClipByPolygon Class

分析服务.ClipByPolygon(option)

多边形裁剪

Fx构造函数

# new ClipByPolygon(option)

Zondy.Service.ClipByPolygon

参数:
名称 类型 属性 默认值 描述
option Object

属性键值对

srcInfo String <optional>
null

源图层URL

strPos String <optional>
null

多边形点坐标串。strPos为STRING格式,内容是多边形几个点坐标:x1,y1,x2,y2....

查看源代码 service/Igserver/MRFWS/ClipByPolygon.js, line 8

Example
//缓存结果图层的基地址
 var resultBaseUrl = "gdbp://MapGisLocal/OpenLayerVecterMap/sfcls/";
 var resultname = resultBaseUrl + "clipByCircleAnalysisResultLayer" + self.getCurentTime();
 //实例化ClipByLayer类
 //实例化ClipByPolygon类develop.smaryun.com
 var clipParam = new Zondy.Service.ClipByPolygon({
                    //IGServer所在ip地址
                    ip: "develop.smaryun.com",
                    //IGServer请求端口号
                    port: "6163"
                });
 //设置被裁剪图层URL
 clipParam.srcInfo = "gdbp://MapGisLocal/OpenLayerVecterMap/ds/世界地图经纬度/sfcls/世界政区";
 //设置结果URL
 clipParam.desInfo = resultname;
 //多边形点坐标串
 clipParam.strPos = "0.46, 30.1,11.48, 6.22,36.73, 7.6,58.77, 25.51,41.33, 49.39, 0.46, 30.1";
 clipParam.execute(function (res) {
                    console.log(res);
                }, "post",function (error) {
                    console.log(error);
                });

继承关系

  • Zondy.Service.ClipBase