@@ -63,7 +63,7 @@ export class FGBLayer {
63
63
constructor ( options = { } ) {
64
64
this . id = options . layerID ? options . layerID : CommonUtil . createUniqueID ( 'FGBLayer_' ) ;
65
65
this . layerId = this . id + 'outer' ;
66
- this . sourceId = this . layerId ;
66
+ this . _sourceId = this . layerId ;
67
67
this . options = options ;
68
68
this . strategy = options . strategy || 'bbox' ;
69
69
this . url = options . url ;
@@ -134,20 +134,20 @@ export class FGBLayer {
134
134
async _handleFeatures ( bounds ) {
135
135
let iter = await this . renderer . _loadData ( bounds ) ;
136
136
const features = await this . renderer . iterateFeatures ( iter ) ;
137
- if ( ! this . map . getSource ( this . sourceId ) ) {
138
- this . map . addSource ( this . sourceId , {
137
+ if ( ! this . map . getSource ( this . _sourceId ) ) {
138
+ this . map . addSource ( this . _sourceId , {
139
139
type : 'geojson' ,
140
140
data : features
141
141
} ) ;
142
142
} else {
143
- this . map . getSource ( this . sourceId ) . setData ( features ) ;
143
+ this . map . getSource ( this . _sourceId ) . setData ( features ) ;
144
144
}
145
145
if ( ! this . map . getLayer ( this . layerId ) ) {
146
146
this . layerType = this . renderer . layerType ;
147
147
const layer = Object . assign ( {
148
148
id : this . layerId ,
149
149
type : this . layerType ,
150
- source : this . sourceId ,
150
+ source : this . _sourceId ,
151
151
paint : Object . assign ( PAINT_MAP [ this . layerType ] , this . options . paint ) || { } ,
152
152
layout : this . options . layout || { }
153
153
} ) ;
@@ -164,7 +164,7 @@ export class FGBLayer {
164
164
if ( ! alreadyLoaded ) {
165
165
let iter = await this . renderer . _loadData ( extentToLoad ) ;
166
166
const features = await this . renderer . iterateFeatures ( iter ) ;
167
- this . map . getSource ( this . sourceId ) . setData ( features ) ;
167
+ this . map . getSource ( this . _sourceId ) . setData ( features ) ;
168
168
}
169
169
}
170
170
}
0 commit comments