首页 / 浏览问题 / 云GIS / 问题详情
等值线提取问题,提取不出结果
16EXP 2020年08月17日
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的地图

1个回答

您好,您的这个问题和您之前提问的问题非常类似,都是是坐标系的问题,具体您可以参考我上次的回答。同时您的构造的region 是已经超出地图坐标系范围的
3,352EXP 2020年08月17日
...