二维叠加分析一直 报错

0 投票
 function overlayAnalystProcess() {
        
        var test1=L.marker([38,117]).addTo(map);
        datasetOverlayAnalystParameters = new SuperMap.GeometryOverlayAnalystParameters({
            operateDataset: test1,
            sourceDataset: "BaseMap_R@Jingjin",
            //tolerance: 0,
            operation: SuperMap.OverlayOperationType.INTERSECT
        });
        overlayAnalystService = L.supermap.spatialAnalystService(serviceUrl);
        console.log(overlayAnalystService)
        overlayAnalystService.overlayAnalysis(datasetOverlayAnalystParameters, function (serviceResult) {
            console.log(serviceResult);
             var result = serviceResult.result;
             resultLayer = L.geoJSON(serviceResult.result.recordset.features, {color: 'red'}).addTo(map);
        });

我想把一个点和一个面进行叠加分析,判断该点是否在面内,为什么一直溢出了,报   Maximum call stack size exceeded

12月 17, 2020 分类:  222次浏览 | 用户: Zzy 才疏学浅 (19 分)

1个回答

0 投票
你好,你代码里面对叠加分析中操作数据集的名称写法有误,应该是:operateDataset: "test1"
12月 17, 2020 用户: Carlo 名扬四海 (2,775 分)
function overlayAnalystProcess() {
        overlayAnalystService = L.supermap.spatialAnalystService(serviceUrl);
         var test1=L.marker([38,117]).addTo(map);
         
        datasetOverlayAnalystParameters = new SuperMap.GeometryOverlayAnalystParameters({
            sourceDataset: "BaseMap_R@Jingjin",
            operateDataset: "test1",
            //tolerance: 0,
            operation: SuperMap.OverlayOperationType.INTERSECT
        });
        overlayAnalystService.overlayAnalysis(datasetOverlayAnalystParameters, function (serviceResult) {
            var result = serviceResult.result;
            resultLayer = L.geoJSON(result.recordset.features).addTo(map);
        });
}

改了之后,为什么请求是code: 400, errorMsg: "错误的被叠加几何对象。Geometry为null

点  叠加  面有具体的示例吗
...