首页 / 浏览问题 / WebGIS / 问题详情
等值线提取范围问题
3EXP 2021年08月13日

超图的工作人员你好,有个问题想请教一下:

1.如果我想参数clipregion设置为已发布数据源里的ChinaRegion,代码应该怎么写。

function AVGTMP(){
		//参数设置
        surfaceAnalystParameters = new SuperMap.DatasetSurfaceAnalystParameters({
            extractParameter: new SuperMap.SurfaceAnalystParametersSetting({
                datumValue: -20,// 表面分析中提取等值线基准值
                interval: 1,// 等值距,两条等值线之间的间隔值
                resampleTolerance: 0,// 重采样容限
                smoothMethod: SuperMap.SmoothMethod.BSPLINE,// 光滑处理所使用的方法
                smoothness: 3, // 等值线的光滑度
                clipRegion: region// 裁剪对象
            }),
            dataset: "CityClimate@ChinaClimate",//数据集
            resolution: 9000,   // 中间结果分辨率
            zValueFieldName: "AVG_TMP"// 用于提取操作的字段名称
        });	
        surfaceAnalystService = L.supermap.spatialAnalystService(serviceUrl);
        surfaceAnalystService.surfaceAnalysis(surfaceAnalystParameters, function (serviceResult) {
			var result = serviceResult.result;
            if (result && result.recordset && result.recordset.features) {
                resultLayer = L.geoJSON(result.recordset.features, {weight: 3}).addTo(map);
            } else {
                console.log(surfaceAnalystService);
                alert(serviceResult.error.errorMsg);
            }
        });
     }

1个回答

您好,您可以参考下apihttps://iclient.supermap.io/web/apis/leaflet.html 根据api来进行构造面对象

1,000EXP 2021年08月13日
您好这个方法只能设置经纬度呀
...