@@ -98,6 +98,7 @@ const dpiConfig = {
9898 * @param {function } [options.mapSetting.overlays] - 地图的overlays
9999 * @param {function } [options.mapSetting.controls] - 地图的控件
100100 * @param {function } [options.mapSetting.interactions] - 地图控制的参数
101+ * @param {number } [options.restDataSingleRequestCount=1000] - 自定义restData分批请求,单次请求数量
101102 * @extends {ol.Observable }
102103 * @usage
103104 */
@@ -130,6 +131,7 @@ export class WebMap extends Observable {
130131 this . events = new Events ( this , null , [ "updateDataflowFeature" ] , true ) ;
131132 this . webMap = options . webMap ;
132133 this . tileFormat = options . tileFormat && options . tileFormat . toLowerCase ( ) ;
134+ this . restDataSingleRequestCount = options . restDataSingleRequestCount || 1000 ;
133135 this . createMap ( options . mapSetting ) ;
134136 if ( this . webMap ) {
135137 // webmap有可能是url地址,有可能是webmap对象
@@ -2163,7 +2165,7 @@ export class WebMap extends Observable {
21632165 that . layerAdded ++ ;
21642166 that . sendMapToUser ( layerLength ) ;
21652167 that . errorCallback && that . errorCallback ( err , 'getFeatureFaild' , that . map )
2166- } , that . baseProjection . split ( "EPSG:" ) [ 1 ] ) ;
2168+ } , that . baseProjection . split ( "EPSG:" ) [ 1 ] , this . restDataSingleRequestCount ) ;
21672169 }
21682170
21692171 /**
@@ -2647,7 +2649,7 @@ export class WebMap extends Observable {
26472649 await that . addLayer ( layerInfo , features , layerIndex ) ;
26482650 } , function ( err ) {
26492651 that . errorCallback && that . errorCallback ( err , 'autoUpdateFaild' , that . map ) ;
2650- } ) ;
2652+ } , undefined , this . restDataSingleRequestCount ) ;
26512653 }
26522654 }
26532655
0 commit comments