ipecharts.option.mapbox3d module#
- class ipecharts.option.mapbox3d.Mapbox3D(**kwargs: Any)[source]#
Bases:
BaseWidget- Warning:
Autogenerated class
A geographic component based on mapbox-gl-js. Support for drawing [3D Scatter](#series-scatter3D), [3D Lines](#series-lines3D), [3D Bar](#series-bar3D), [3D map](#series-map3D) on mapbox maps. You can take advantage of Mapbox’s powerful map service and ECharts GL’s rich visualization and rendering effects to achieve the visualization you want.
You need to introduce the official sdk of mapbox before using the mapbox component.
``` <script src=’https://api.mapbox.com/mapbox-gl-js/v0.38.0/mapbox-gl.js’></script> <link href=’https://api.mapbox.com/mapbox-gl-js/v0.38.0/mapbox-gl.css’ rel=’stylesheet’ />
Then get the token provided by mapbox and set it to mapbox.accessToken.
``` mapboxgl.accessToken = ‘your token’;
Then you can use the mapbox component just like any other component.
``` chart.setOption({
- mapbox: {
style: ‘mapbox://styles/mapbox/dark-v9’
}
});
Go to <https://www.mapbox.com/mapbox-gl-js/api/> for more details on mapbox-gl-js sdk.
- style Union(None)#
Sets the style of the Mapbox map. Same as <https://www.mapbox.com/mapbox-gl-js/style-spec/>.
- center Any(None)#
Sets the longitude and latitude of the center of the map. Longitude and latitude are represented by arrays, for example:
``` mapbox3D: {
center: [104.114129, 37.550339], zoom: 3
}
- zoom Float(None)#
Sets the zoom level of the map. See <https://www.mapbox.com/mapbox-gl-js/style-spec/#root-zoom>
- bearing Float(None)#
Sets the bearing angle of the map. See <https://www.mapbox.com/mapbox-gl-js/style-spec/#root-bearing>
- pitch Float(None)#
Sets the pitch angle of the map. The default is 0 means perpendicular to the surface of the map. The greater value is 60. See <https://www.mapbox.com/mapbox-gl-js/style-spec/#root-pitch>
- altitudeScale Float(None)#
The zoom of the altitude Scale.
- shading Unicode(None)#
The coloring effect of 3D graphics in mapbox3D. The following three coloring methods are supported in echarts-gl:
‘color’ Only display colors, not affected by other factors such as lighting.
‘lambert’ Through the classic [lambert] coloring, can express the light and dark that the light shows.
‘realistic’ Realistic rendering, combined with [light.ambientCubemap](#globe.light.ambientCubemap) and [postEffect](#globe.postEffect), can improve the quality and texture of the display. [Physical Based Rendering (PBR)] (<https://www.marmoset.co/posts/physically-based-rendering-and-you-can-too/>) is used in ECharts GL to represent realistic materials.
- realisticMaterial Dict()#
The configuration item of the realistic material is valid when [shading](#mapbox3D.shading) is ‘realistic’.
- lambertMaterial Dict()#
The configuration item of the lambert material is valid when [shading](#mapbox3D.shading) is ‘lambert’.
- colorMaterial Dict()#
The color material related configuration item is valid when [shading](#mapbox3D.shading) is ‘color’.
- light Dict()#
Light related settings. Invalid when [shading](#mapbox3D.shading) is ‘color’.
The lighting settings affect the components and all the charts on the component’s coordinate system.
A reasonable lighting setting can make the brightness and darkness of the whole scene richer and more layered.
- postEffect Dict()#
Post-processing effects related configuration. It can add effects such as highlights, depth of field, screen space ambient occlusion (SSAO), toning to the picture. And it can make the whole picture more textured.
The following are the differences between closing postEffect and opening postEffect.
 
Note that when postEffect is enable, [temporalSuperSampling](#mapbox3D.temporalSuperSampling) is enable by default. After the picture is still, the picture will continue to be enhanced, including anti-aliasing, depth of field, SSAO, shadows, etc.
- temporalSuperSampling Dict()#
Temporal supersampling. After opening [postEffect](#mapbox3D.postEffect), WebGL’s default MSAA (MultiSampling Anti-Aliasing) will not work, so we need to solve the problem of sampling.
Temporal supersampling is an anti-aliasing method. After the picture is still, it will continue to sample multiple times and taken at several instances inside the pixel and an average color value is calculated, thus achieving anti-aliasing effect. And in this process, ECharts-gl also progressively enhances some of the effects in [postEffect](#mapbox3D.postEffect) that require sampled guarantees. For example [SSAO](#mapbox3D.postEffect.SSAO), [Depth of Field](#mapbox3D.postEffect.depthOfField), and shadow.
The following is the difference between not opening temporalSuperSampling and opening temporalSuperSampling.
 