-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
Version: 5.0.0
Problem: I am unable to add a custom layer to a map (using StaticMap) inside of a DeckGL framework. I get an error that a source
must be specified and that type: custom
is not supported
class threeJSModel{
constructor(){
this.id='custom_layer';
this.type='custom';
this.renderingMode = '3d'
}
onAdd(map, gl) {
//create 3JS scene here
}
render(gl, matrix) {
//render the scene
}
}
and then I add it to the map as follows:
const mapStyle = defaultMapStyle
.set('layers', defaultMapStyle.get('layers').push(fromJS(new threeJSModel())))
this.setState({mapStyle})
<StaticMap
ref = {this._mapRef}
reuseMaps
mapStyle={this.state.mapStyle}
preventStyleDiffing={true}
mapboxApiAccessToken={MAPBOX_TOKEN}
/>
}
Metadata
Metadata
Assignees
Labels
No labels