Leaflet等值线提取代码无法显示结果

0 投票

问题和http://ask.supermap.com/97351相似,serviceResult.result是undefined,在iServer上直接填写参数分析可以成功,但网页代码无法显示结果,裁剪范围设置为null。

关键代码:

//等值线提取
		   var spaAnaUrl="http://localhost:8090/iserver/services/spatialAnalysis-ChinaClimate/restjsr/spatialanalyst";
		   function surfaceAnalystProcess() {
		          
		           surfaceAnalystParameters = new SuperMap.DatasetSurfaceAnalystParameters({
		               extractParameter: new SuperMap.SurfaceAnalystParametersSetting({
		                   datumValue: 15,
		                   interval: 4,
		                   resampleTolerance: 0,
		                   smoothMethod: SuperMap.SmoothMethod.BSPLINE,
		                   smoothness: 3,
						   clipRegion: null
		                   
		               }),
		               dataset: "China_ProCenCity_pt@ChinaClimate",
		               resolution: 9000,
		               zValueFieldName: "温度04_30"
		           });
				   
				   
		           surfaceAnalystService = L.supermap.spatialAnalystService(spaAnaUrl);
		           surfaceAnalystService.surfaceAnalysis(surfaceAnalystParameters, function (serviceResult) {
		               var result = serviceResult.result;
					   
		               if (result && result.recordset && result.recordset.features) {
		                   resultLayer = L.geoJSON(L.Util.transform(serviceResult.result.features, L.CRS.EPSG3857, L.CRS.EPSG4326), {weight: 3}).addTo(map);
						   
		               } 
					   else {
		                   alert(serviceResult.error.errorMsg);
		               }
		           });
		       }
		    surfaceAnalystProcess();

8月 9 分类:  72次浏览 | 用户: weixia0127 (3 分)

1个回答

0 投票
您好,有报错信息吗,对比iserver检查一下参数填写是否正确呢
8月 9 用户: y_98 才高八斗 (825 分)
...