Skip to content

Commit 129c0a8

Browse files
committed
[fix]maplinregl&&openlayers callback promise review by qiw
1 parent 9d32e40 commit 129c0a8

File tree

66 files changed

+288
-305
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+288
-305
lines changed

examples/maplibregl/01_mapQueryBySQL_FGB.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
}
5858
});
5959

60-
queryService = new maplibregl.supermap.QueryService(url).queryBySQL(param, function (serviceResult) {
60+
queryService = new maplibregl.supermap.QueryService(url).queryBySQL(param, 'FGB').then(function (serviceResult) {
6161
var FGBLayer = new maplibregl.supermap.FGBLayer({
6262
url: serviceResult.result.newResourceLocation,
6363
layerID: 'points',
@@ -68,7 +68,7 @@
6868
}
6969
});
7070
map.addLayer(FGBLayer);
71-
}, 'FGB');
71+
});
7272
}
7373

7474
</script>

examples/maplibregl/02_getFeatureBySQL_FGB.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777

7878
new maplibregl.supermap.FeatureService(dataUrl).getFeaturesBySQL(
7979
sqlParam,
80-
function (serviceResult) {
80+
'FGB'
81+
).then(function (serviceResult) {
8182
var FGBLayer = new maplibregl.supermap.FGBLayer({
8283
url: serviceResult.result.newResourceLocation,
8384
layerId: 'queryDatas',
@@ -100,9 +101,7 @@
100101
)
101102
.addTo(map);
102103
});
103-
},
104-
'FGB'
105-
);
104+
});
106105
}
107106
</script>
108107
</body>

examples/maplibregl/04_bufferAnalystService_FGB.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
})
9797
});
9898
//缓冲区分析服务 使用 FGB 格式
99-
new maplibregl.supermap.SpatialAnalystService(serviceUrl).bufferAnalysis(dsBufferAnalystParameters, function (serviceResult) {
99+
new maplibregl.supermap.SpatialAnalystService(serviceUrl).bufferAnalysis(dsBufferAnalystParameters, 'FGB').then(function (serviceResult) {
100100
var FGBLayer = new maplibregl.supermap.FGBLayer({
101101
url: serviceResult.result.newResourceLocation,
102102
strategy: 'all',
@@ -106,7 +106,7 @@
106106
}
107107
});
108108
map.addLayer(FGBLayer);
109-
}, 'FGB')
109+
})
110110
}
111111
</script>
112112
</body>

examples/maplibregl/04_bufferAnalystService_geometry_FGB.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@
129129

130130
new maplibregl.supermap.SpatialAnalystService(serviceUrl).bufferAnalysis(
131131
geoBufferAnalystParams,
132-
function (serviceResult) {
132+
null,
133+
'FGB'
134+
).then(function (serviceResult) {
133135
var FGBLayer = new maplibregl.supermap.FGBLayer({
134136
url: serviceResult.result.newResourceLocation,
135137
strategy: 'all',
@@ -139,9 +141,7 @@
139141
}
140142
});
141143
map.addLayer(FGBLayer);
142-
},
143-
'FGB'
144-
);
144+
});
145145
}
146146
</script>
147147
</body>

examples/maplibregl/04_overlayAnalystService_FGB.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@
6060

6161
new maplibregl.supermap.SpatialAnalystService(serviceUrl).overlayAnalysis(
6262
datasetOverlayAnalystParameters,
63-
function (serviceResult) {
63+
'FGB'
64+
).then(function (serviceResult) {
6465
var FGBLayer = new maplibregl.supermap.FGBLayer({
6566
url: serviceResult.result.newResourceLocation,
6667
strategy: 'all',
@@ -70,9 +71,7 @@
7071
}
7172
});
7273
map.addLayer(FGBLayer);
73-
},
74-
'FGB'
75-
);
74+
});
7675
}
7776
</script>
7877
</body>

examples/maplibregl/04_surfaceAnalystService_FGB.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
});
8181
//创建表面分析服务实例
8282
surfaceAnalystService = new maplibregl.supermap.SpatialAnalystService(serviceUrl);
83-
surfaceAnalystService.surfaceAnalysis(surfaceAnalystParameters, function (surfaceAnalystServiceResult) {
83+
surfaceAnalystService.surfaceAnalysis(surfaceAnalystParameters, 'FGB').then(function (surfaceAnalystServiceResult) {
8484
var FGBLayer = new maplibregl.supermap.FGBLayer({
8585
url: surfaceAnalystServiceResult.result.newResourceLocation,
8686
featureLoader: function(feature) {
@@ -106,7 +106,7 @@
106106
}
107107
});
108108
map.addLayer(FGBLayer);
109-
}, 'FGB');
109+
});
110110
}
111111
</script>
112112
</body>

examples/maplibregl/04_thiessenAnalystService_datasets_FGB.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
dataset: "Town_P@Jingjin"
5353
});
5454

55-
new maplibregl.supermap.SpatialAnalystService(serviceUrl).thiessenAnalysis(dThiessenAnalystParameters, function (serviceResult) {
55+
new maplibregl.supermap.SpatialAnalystService(serviceUrl).thiessenAnalysis(dThiessenAnalystParameters, 'FGB').then(function (serviceResult) {
5656
var FGBLayer = new maplibregl.supermap.FGBLayer({
5757
url: serviceResult.result.newResourceLocation,
5858
strategy: 'all',
@@ -62,7 +62,7 @@
6262
}
6363
});
6464
map.addLayer(FGBLayer);
65-
}, 'FGB');
65+
});
6666
}
6767
</script>
6868
</body>

examples/maplibregl/04_thiessenAnalystService_geometry_FGB.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
points: pointsList
104104
});
105105
//创建泰森多边形服务实例
106-
new maplibregl.supermap.SpatialAnalystService(serviceUrl).thiessenAnalysis(gThiessenAnalystParameters, function (serviceResult) {
106+
new maplibregl.supermap.SpatialAnalystService(serviceUrl).thiessenAnalysis(gThiessenAnalystParameters, 'FGB').then(function (serviceResult) {
107107
var FGBLayer = new maplibregl.supermap.FGBLayer({
108108
url: serviceResult.result.newResourceLocation,
109109
strategy: 'all',
@@ -113,7 +113,7 @@
113113
}
114114
});
115115
map.addLayer(FGBLayer);
116-
}, 'FGB')
116+
})
117117
}
118118
</script>
119119
</body>

examples/maplibregl/rangeTheme3DLayer.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,8 @@
7676

7777
new maplibregl.supermap.FeatureService(dataUrl).getFeaturesBySQL(
7878
getFeatureBySQLParams,
79-
processCompleted,
8079
maplibregl.supermap.DataFormat.GEOJSON
81-
);
80+
).then(processCompleted);
8281
}
8382

8483
function processCompleted(serviceResult) {

examples/maplibregl/rangeThemeLayer.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ <h5 class='panel-title text-center'>
119119
});
120120
new maplibregl.supermap.FeatureService(dataUrl).getFeaturesBySQL(
121121
getFeatureBySQLParams,
122-
null,
123122
maplibregl.supermap.DataFormat.ISERVER
124123
).then(processCompleted);
125124

0 commit comments

Comments
 (0)