@@ -60,7 +60,7 @@ export class FGBLayer {
6060 constructor ( options = { } ) {
6161 this . id = options . layerID ? options . layerID : CommonUtil . createUniqueID ( 'FGBLayer_' ) ;
6262 this . layerId = this . id + 'outer' ;
63- this . sourceId = this . layerId ;
63+ this . _sourceId = this . layerId ;
6464 this . options = options ;
6565 this . strategy = options . strategy || 'bbox' ;
6666 this . url = options . url ;
@@ -131,20 +131,20 @@ export class FGBLayer {
131131 async _handleFeatures ( bounds ) {
132132 let iter = await this . renderer . _loadData ( bounds ) ;
133133 const features = await this . renderer . iterateFeatures ( iter ) ;
134- if ( ! this . map . getSource ( this . sourceId ) ) {
135- this . map . addSource ( this . sourceId , {
134+ if ( ! this . map . getSource ( this . _sourceId ) ) {
135+ this . map . addSource ( this . _sourceId , {
136136 type : 'geojson' ,
137137 data : features
138138 } ) ;
139139 } else {
140- this . map . getSource ( this . sourceId ) . setData ( features ) ;
140+ this . map . getSource ( this . _sourceId ) . setData ( features ) ;
141141 }
142142 if ( ! this . map . getLayer ( this . layerId ) ) {
143143 this . layerType = this . renderer . layerType ;
144144 const layer = Object . assign ( {
145145 id : this . layerId ,
146146 type : this . layerType ,
147- source : this . sourceId ,
147+ source : this . _sourceId ,
148148 paint : Object . assign ( PAINT_MAP [ this . layerType ] , this . options . paint ) || { } ,
149149 layout : this . options . layout || { }
150150 } ) ;
@@ -161,7 +161,7 @@ export class FGBLayer {
161161 if ( ! alreadyLoaded ) {
162162 let iter = await this . renderer . _loadData ( extentToLoad ) ;
163163 const features = await this . renderer . iterateFeatures ( iter ) ;
164- this . map . getSource ( this . sourceId ) . setData ( features ) ;
164+ this . map . getSource ( this . _sourceId ) . setData ( features ) ;
165165 }
166166 }
167167}
0 commit comments