Fx构造函数
# new ProjectByLayer(project, option)
Zondy.Service.ProjectByLayer
参数:
名称 | 类型 | 属性 | 默认值 | 描述 |
---|---|---|---|---|
project |
Object | 属性键值对 |
||
projTypeID |
Number |
<optional> |
23 | 投影类型 0地理坐标系,1UTM,2兰伯特等角圆锥投影坐标系 |
sphereType |
Number |
<optional> |
2 | 椭球体类型,2为西安80 |
projAngleUnit |
Number |
<optional> |
5 | 弧度单位,1为毫米,2为米,3为秒,4为度,6为英尺,7为分,8为弧度 |
projType |
Number |
<optional> |
0 | 坐标系类型,0为自定义坐标系、1地理坐标系,3投影平面直角坐标系 |
projZoneType |
Number |
<optional> |
0 | 投影分带类型 |
projZoneNO |
Number |
<optional> |
0 | 投影带号 |
projLon |
Number |
<optional> |
0 | 中央子午线经度 |
projLat |
Number |
<optional> |
0 | 投影原点纬度 |
projLat1 |
Number |
<optional> |
0 | 第一标准维度 |
projLat2 |
Number |
<optional> |
0 | 第二标准维度 |
projUnit |
Number |
<optional> |
2 | 水平单位,1为毫米,2为米,3为秒,4为度,6为英尺,7为分,8为弧度,详细请参见EnumProjAngleUnit |
projRate |
Number |
<optional> |
1 | 水平比例尺 |
x |
Number |
<optional> |
0 | 投影偏移x |
y |
Number |
<optional> |
0 | 投影偏移y |
option |
Object | 属性键值对,用来拓展属性 |
Example
//缓存结果图层的基地址
var resultBaseUrl = "gdbp://MapGisLocal/OpenLayerVecterMap/sfcls/";
//显示结果的图层名称
var resultname = resultBaseUrl + "overLayByPolyAnalysisResultLayer" + self.getCurentTime();
var projByLayer = new Zondy.Service.ProjectByLayer({
//设置服务ip
ip: "develop.smaryun.com",
//设置端口号
port: "6163",
//投影类型,0地理坐标系,1UTM,2兰伯特等角圆锥投影坐标系
projTypeID: 23,
//椭球体类型,2为西安80
sphereType: 2,
//弧度单位,1为毫米,2为米,3为秒,4为度,6为英尺,7为分,8为弧度
projAngleUnit: 5,
//坐标系类型,0为自定义坐标系、1地理坐标系,3投影平面直角坐标系
projType: 0,
//投影分带类型
projZoneType: 0,
//投影带号
projZoneNO: 0,
//中央子午线经度
projLon: 0,
//投影原点纬度
projLat: 0,
//第一标准维度
projLat1: 0,
//第二标准维度
projLat2: 0,
//水平单位,1为毫米,2为米,3为秒,4为度,6为英尺,7为分,8为弧度,详细请参见EnumProjAngleUnit
projUnit: 2,
//水平比例尺
projRate: 1,
x: 0,
y: 0,
resultName: "rel"
});
//需转换的要素类地址,继承于ProjectBase类属性
projByLayer.clsName = "gdbp://MapGisLocal/OpenLayerVecterMap/ds/世界地图经纬度/sfcls/世界政区";
//结果要素类地址,继承ProjectBase类属性
projByLayer.desClsName = resultname;
projByLayer.execute(function (res) {
console.log(res);
}, "post",function (error) {
console.log(error);
});
继承关系
- Zondy.Service.ProjectBase