Map container
The 3D city map container holds the map and its sub-widgets. You can add sub-widgets, such as geo-fences and label bulletin boards, and configure the map's basic properties and quick styles. The container renders 3D geographical effects of the city from multiple angles and in various forms. This topic describes the configuration items of the 3D city map container.
The 3D city widget is available only for DataV Professional Edition or later. To use this widget, you must upgrade your DataV edition to Professional Edition or later.
Select a scene area
Click the 3D City widget in the widget bar. The Select Scene Area dialog box appears.
ImportantGray areas do not have city data. If you select a gray area, the 3D city scene content cannot be loaded.
Click the city list in the upper-left corner of the dialog box and select the 3D city that you want to display.
After you select a city, the city map appears in the dialog box. Click the
or
icon on the left, or scroll the mouse wheel to zoom in or out of the map. Press and hold the mouse button to drag the map and move the display area.After you move and scale the city map area as needed, click the
icon on the left. In the map area, select a square area to be the scene area for the widget's final display.ImportantAfter you upgrade the 3D city widget to version 2.1.x or later, you can select a scene area from 1 km² to 49 km². If you use a version earlier than 2.1.0, you can only select an area from 1 km² to 9 km². To select a larger area, you must upgrade the 3D city widget.
Select Load available detailed models in the area in the upper-right corner of the dialog box to automatically load the widget's built-in detailed building models within the selected area. If you clear this option, the detailed models are not loaded. You can choose whether to display dark-style detailed buildings based on your style requirements.
Click OK in the bottom-right corner of the dialog box to add the 3D city map widget and load the selected area. Click Cancel to cancel the operation.
Camera settings
To open the Camera Settings, click the
button in the upper-right corner of the 3D City component on the canvas or double-click the component.In the Camera settings panel, configure the camera parameters.
The camera settings include the following parameters.
Parameter
Description
Camera Animation
Configure the camera view animation. If you turn this off, you cannot configure the camera view animation, and you can only set and save one fixed default view. The scene is static when you preview or publish the 3D city. If you turn this on, you can set the animation type and style. The animation plays in the mode you define when you preview or publish the 3D city.
Animation Type
Set the animation playback type. You can select Orbit or Two-point Path.
Camera View
Set the camera view for different animation types. Click the camera view box for a specific type to switch to that view. Click Save current view on the right to save the current map camera view for the corresponding animation type.
If Animation type is set to Orbit, the camera view is saved as the orbit view. The animation starts from the current view and rotates around the map's centroid.
If Animation type is set to Two-point Path, you must save views for the Path start point and Path end point. The animation moves from the Path start point view to the Path end point view.
Autoplay
If you turn on autoplay, the camera animation plays automatically when you preview or publish the screen. If you turn it off, you must press the space bar to play or pause the animation. You can also use the Blueprint Editor to configure triggers to play, pause, or stop the animation.
Animation Duration
Set the duration of the camera animation. The range is from 1 to 100 seconds. Select whether to loop the animation. If turned off, the animation plays only once. If turned on, the animation loops continuously.
Animation Preview
Preview the configured camera animation style. You can click to play, pause, or stop. If you click Play in the Camera settings panel, the animation stops if you change any other parameter during playback.
In the selected 3D city scene area, you can change the map's camera view. After you make changes, you must save the camera view.
You can change the camera view with the mouse in the following ways:
Click and hold the left mouse button to rotate the scene map.
Click and hold the right mouse button to drag and pan the map.
Scroll the mouse wheel to zoom in or out of the scene map.
After you configure the camera parameters, click the
icon in the upper-right corner of the Camera settingsExit panel.- Note
Camera settingsYou can reopen the Camera settings panel to modify the parameters after exiting. Each time you open the panel, you must save any changes to the camera view. Otherwise, a dialog box prompts you to save the view when you exit.
Configuration
Sub-widget Management
Add a sub-widget:
In the console, click the 3D city map widget. The Configuration page opens on the right.
Click the
icon to the left of Sub-component ManagementSelect one or more subcomponents and click Add Subcomponent. The subcomponents then appear in Subcomponent Management.
Click an added sub-widget to configure its parameters, as shown in the following figure.
After you complete the configuration, click the
icon to return to the 3D city map configuration panel and configure other sub-widgets.
Copy, edit, or delete a sub-widget: Hover over an added sub-widget. Click the
icon on the right to copy the sub-widget. Click the
icon to edit the sub-widget name. Click the
icon to delete the sub-widget. NoteFor more information about sub-widget operations, see Manage map sub-widgets.
- Search for Configurations: In the right-side panel of Canvas Editor, click the Settings tab, and click Search for Configurations in the upper-right corner. Enter the required configuration item in the search box, and click the search icon to quickly locate the configuration item. Fuzzy match is supported. For more information, see Search for Configurations.
- Size: indicates the size of a widget, including its pixel width and height. You can click the
icon to proportionally adjust the width and height of a widget. After you click this icon again, you can adjust the width and height as needed. - Position: the position of a widget, which is indicated by pixel X and Y coordinates. X-coordinate indicates the pixel distance between the upper-left corner of the widget and the left border of the canvas. Y-coordinate indicates the pixel distance between the upper-left corner of the widget and the upper border of the canvas.
- Rotation Angle: the angle of a rotation that uses the center point of a widget as the rotation point. The unit is degrees (°). You can use one of the following methods to control the rotation angle of a widget:
- Directly enter the degrees in the Rotation Angle spin box or click the plus sign (+) or minus sign (-) to increase or decrease the value in the Rotation Angle spin box.
- Drag the black dot in the
icon. - Click the
icon to horizontally flip a widget. - Click the
icon to vertically flip a widget.
- Opacity: the opacity of a widget. Valid values: 0 and 1. If this parameter is set to 0, the widget is hidden. If this parameter is set to 1, the widget is completely displayed. Default value: 1.
Quick Style: Sets the style of the 3D city map. The available options are Sketch Tech and Business Tech.
Time System: Sets the time system style for the 3D city map.
Parameter
Description
Start time
Sets the start time for the map preview. Options are Morning, Noon, Evening, and Midnight.
End time
Sets the end time for the map preview. Options are Morning, Noon, Evening, and Midnight.
NoteStart time and End time are the same, the lighting in the 3D city scene remains static. If they are different, the city plays a time-lapse scene based on the configured animation duration.
Animation duration
The duration of the animation from the Start time to the End time, in seconds.
Auto loop
Turn on to loop the time system animation. Turn off to play the animation only once during preview or publishing.
Effects: Sets the effects for the 3D city map.
Show Terrain: Toggles the display of the terrain style on the 3D city map.
Data
Reselect Data Range: In the data panel, click Reselect Data Range to open the Select Area dialog box. In this dialog box, you can select map content for a different region. For more information, see Select a scene area.
Interaction
This widget has no configurable interaction events.
Blueprint Editor interaction configuration
- In Canvas Editor, right-click a widget in the Layer panel and select Add to Blueprint Editor.
- Click the
icon in the upper-left corner of the page. On the Blueprint Editor configuration page, click the 3D City widget in the imported nodes panel. The configuration parameters for the 3D city widget in the Blueprint Editor appear on the canvas, as shown in the following figure.
Events
Event
Description
When the widget finishes rendering
The widget finishes rendering. No data is returned.
When the view is adjusted
The view adjustment is complete. No data is returned.
Actions
Parameter
Description
Stop animation
Stops the map animation. No parameters are required.
Play animation
Plays the map animation. No parameters are required.
Pause animation
Pauses the map animation. No parameters are required.
Update widget configuration
Dynamically updates the style configuration of the widget. First, in the Configuration panel of the widget, click Copy Configuration to Clipboard to get the widget configuration data. Then, in a data processing node on the Blueprint Editor page, change the field values for the corresponding styles as needed.
Show
Shows the widget. No parameters are required.
Hide
Hides the widget. No parameters are required.
Toggle visibility
Toggles the visibility of the widget. The following code provides an example of the parameters.
{ // true for show, false for hide. "status": true, // Show animation. "animationIn": { // Animation type. Set to fade. If left empty, there is no animation. "animationType": "fade", // Show delay in ms. "animationDuration": 1000, // Show animation function. Options: linear, easeInOutQuad, easeInOutExpo. "animationEasing": "linear" }, // Hide animation. "animationOut": { // Animation type. Set to fade. If left empty, there is no animation. "animationType": "fade", // Hide delay in ms. "animationDuration": 1000, // Hide animation function. Options: linear, easeInOutQuad, easeInOutExpo. "animationEasing": "linear" } }Move
Moves the widget to a specified position. The following code provides an example of the parameters.
{ // Move type. Absolute position: to. Relative position: by. Default: to. "positionType": "to", // Specified position. x-coordinate, y-coordinate. "attr": { "x": 0, "y": 0 }, // Animation method. "animation": { "enable": false, // Animation delay. "animationDuration": 1000, // Animation curve. Options: linear, easeInOutQuad, easeInOutExpo. "animationEasing": "linear" } }