1.Chrome控制台中 net::ERR_CONNECTION_REFUSED
js频繁发送请求,有可能连接被拒绝,可用setTimeout,过几秒发送,给个缓冲时间
var overlayAnalystService = L.supermap.spatialAnalystService(serviceUrl); setTimeout(function () { var datasetOverlayAnalystParameters = new SuperMap.DatasetOverlayAnalystParameters({ sourceDataset: dataset, operateRegions: [polygon], tolerance: 0, operation: SuperMap.OverlayOperationType.CLIP, resultSetting: new SuperMap.DataReturnOption({expectCount: 0}) }); overlayAnalystService.overlayAnalysis(datasetOverlayAnalystParameters, function (serviceResult) { if(serviceResult && serviceResult.result && serviceResult.result.recordset) { var features = serviceResult.result.recordset.features.features; ... } })
}, 1000);