@@ -60,7 +60,7 @@ export class FGBLayer {
60
60
constructor ( options = { } ) {
61
61
this . id = options . layerID ? options . layerID : CommonUtil . createUniqueID ( 'FGBLayer_' ) ;
62
62
this . layerId = this . id + 'outer' ;
63
- this . sourceId = this . layerId ;
63
+ this . _sourceId = this . layerId ;
64
64
this . options = options ;
65
65
this . strategy = options . strategy || 'bbox' ;
66
66
this . url = options . url ;
@@ -131,20 +131,20 @@ export class FGBLayer {
131
131
async _handleFeatures ( bounds ) {
132
132
let iter = await this . renderer . _loadData ( bounds ) ;
133
133
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 , {
136
136
type : 'geojson' ,
137
137
data : features
138
138
} ) ;
139
139
} else {
140
- this . map . getSource ( this . sourceId ) . setData ( features ) ;
140
+ this . map . getSource ( this . _sourceId ) . setData ( features ) ;
141
141
}
142
142
if ( ! this . map . getLayer ( this . layerId ) ) {
143
143
this . layerType = this . renderer . layerType ;
144
144
const layer = Object . assign ( {
145
145
id : this . layerId ,
146
146
type : this . layerType ,
147
- source : this . sourceId ,
147
+ source : this . _sourceId ,
148
148
paint : Object . assign ( PAINT_MAP [ this . layerType ] , this . options . paint ) || { } ,
149
149
layout : this . options . layout || { }
150
150
} ) ;
@@ -161,7 +161,7 @@ export class FGBLayer {
161
161
if ( ! alreadyLoaded ) {
162
162
let iter = await this . renderer . _loadData ( extentToLoad ) ;
163
163
const features = await this . renderer . iterateFeatures ( iter ) ;
164
- this . map . getSource ( this . sourceId ) . setData ( features ) ;
164
+ this . map . getSource ( this . _sourceId ) . setData ( features ) ;
165
165
}
166
166
}
167
167
}
0 commit comments