Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onDidFinishRenderingMapFully = async () => {
this.setState({
isMapLoaded: true,
clickableLayers: ['editedPois', 'pois', 'editedPolygons',
'buildings', 'roads', 'roadsLower',
'railwayLine', 'waterLine', 'leisure', 'photos'],
userTrackingMode: MapboxGL.UserTrackingModes.None
})
const visibleBounds = await this.mapRef.getVisibleBounds()
const zoomLevel = await this.mapRef.getZoom()
this.props.updateVisibleBounds(visibleBounds, zoomLevel)
}
{
requiresPreauth
? this.renderAuthPrompt()
: (
{ this.mapRef = ref }}
onDidFinishRenderingMapFully={this.onDidFinishRenderingMapFully}
onWillStartLoadingMap={this.onWillStartLoadingMap}
onDidFailLoadingMap={this.onDidFailLoadingMap}
onRegionIsChanging={this.onRegionIsChanging}
onRegionDidChange={this.onRegionDidChange}
regionDidChangeDebounceTime={10}
onPress={this.onPress}
>
{ this.cameraRef = ref }}
/>