@@ -98,6 +98,7 @@ const dpiConfig = {
98
98
* @param {function } [options.mapSetting.overlays] - 地图的overlays
99
99
* @param {function } [options.mapSetting.controls] - 地图的控件
100
100
* @param {function } [options.mapSetting.interactions] - 地图控制的参数
101
+ * @param {number } [options.restDataSingleRequestCount=1000] - 自定义restData分批请求,单次请求数量
101
102
* @extends {ol.Observable }
102
103
* @usage
103
104
*/
@@ -130,6 +131,7 @@ export class WebMap extends Observable {
130
131
this . events = new Events ( this , null , [ "updateDataflowFeature" ] , true ) ;
131
132
this . webMap = options . webMap ;
132
133
this . tileFormat = options . tileFormat && options . tileFormat . toLowerCase ( ) ;
134
+ this . restDataSingleRequestCount = options . restDataSingleRequestCount || 1000 ;
133
135
this . createMap ( options . mapSetting ) ;
134
136
if ( this . webMap ) {
135
137
// webmap有可能是url地址,有可能是webmap对象
@@ -2163,7 +2165,7 @@ export class WebMap extends Observable {
2163
2165
that . layerAdded ++ ;
2164
2166
that . sendMapToUser ( layerLength ) ;
2165
2167
that . errorCallback && that . errorCallback ( err , 'getFeatureFaild' , that . map )
2166
- } , that . baseProjection . split ( "EPSG:" ) [ 1 ] ) ;
2168
+ } , that . baseProjection . split ( "EPSG:" ) [ 1 ] , this . restDataSingleRequestCount ) ;
2167
2169
}
2168
2170
2169
2171
/**
@@ -2647,7 +2649,7 @@ export class WebMap extends Observable {
2647
2649
await that . addLayer ( layerInfo , features , layerIndex ) ;
2648
2650
} , function ( err ) {
2649
2651
that . errorCallback && that . errorCallback ( err , 'autoUpdateFaild' , that . map ) ;
2650
- } ) ;
2652
+ } , undefined , this . restDataSingleRequestCount ) ;
2651
2653
}
2652
2654
}
2653
2655
0 commit comments