var map, region, resultLayer, surfaceAnalystService, surfaceAnalystParameters,
baseUrl = "http://localhost:8090/iserver/services/map-TangShan/rest/maps/QuXian%40Tang",
serviceUrl = "http://localhost:8090/iserver/services/spatialAnalysis-TangShan/restjsr/spatialanalyst";
map = L.map('map', {
preferCanvas: true,
center: [39.7, 118],
maxZoom: 18,
zoom: 9
});
L.supermap.tiledMapLayer(baseUrl, { noWrap: false }).addTo(map).once("load", function () {
surfaceAnalystProcess();
});
function surfaceAnalystProcess() {
region = L.polygon([
[4934666.77168, 13079581.567358 ],
[4934666.77168, 13276757.988509],
[4709397.917556, 13284740.839568],
[4709397.917556, 13074791.856722]
]);
surfaceAnalystParameters = new SuperMap.DatasetSurfaceAnalystParameters({
extractParameter: new SuperMap.SurfaceAnalystParametersSetting({
datumValue: 0,
interval: 2,
resampleTolerance: 0,
smoothMethod: SuperMap.SmoothMethod.BSPLINE,
smoothness: 3,
clipRegion: region
}),
dataset: "Education@Tang",
resolution: 3000,
zValueFieldName: "LE"
});
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: 10 }).addTo(map);
} else {
alert(serviceResult.error.errorMsg);
}
});
}
代码没有任何报错,控制台也没有报错,但是就是没有任何显示,只能显示出地图,求大佬解答,这个地图底图是3857的地图