Buildings

更新时间:
复制 MD 格式

Buildings are a basemap layer in 3D City Builder that are programmatically generated with enhanced geometry. You can configure buildings with either L1 or L2 data precision. This topic uses L2 precision as an example to describe the style and data configuration items for buildings, such as shade, luminous intensity, and building type.

In the Layer List on the left of the scene editor, click the Building layer to open the configuration panel, where you can configure the style and data of the Building layer.

Note

If Building is not in the layer list, this indicates that the Building layer has not been added yet. For instructions on how to add it, see Add a sub-widget.

Style panel

  • General: Sets the general configuration parameters for buildings.

    Parameter

    Description

    Shade

    Set the shade style for buildings. Turn the Cast Shadow switch on or off to control the shade effect.

    Light Effect

    Drag the slider to set the luminous intensity coefficient for buildings. The value ranges from 0 to 1.

  • Graphics: Sets the graphic style for buildings.

    Parameter

    Description

    Low-rise Building

    Set the material style for low-rise buildings. This includes the face type for Style Material A. You can select Top Face or Side Face.

    • Top Face: Set the style parameters for the top face of low-rise buildings. You can adjust the UV tiling values on the x-axis and y-axis, base color, base color map style, roughness value, roughness map style, metalness value, metalness map style, normal map style, ambient occlusion map intensity value, ambient occlusion map style, emissive color, and emissive map style.

    • Side Face: Set the style parameters for the side face of low-rise buildings. You can adjust the UV tiling values on the x-axis and y-axis, color, base color map style, roughness value, roughness map style, metalness value, metalness map style, normal map style, ambient occlusion map intensity value, ambient occlusion map style, emissive color, and emissive map style.

    Note

    Texture maps only support images in PNG or JPG format.

    Mid-rise Building

    Set the material style for mid-rise buildings. This includes the face type for Material A, B, and C. For more information, see the configuration items for low-rise buildings.

    High-rise Building

    Set the material style for high-rise buildings. This includes the face type for Material A and B. For more information, see the configuration items for low-rise buildings.

  • Model: Sets the model style for buildings. This option is available only when L2 data precision is selected for buildings.

    Parameter

    Description

    Model Mapping

    Click the Add icon or Delete icon icon to the right of Model Mapping to add or delete a model mapping. Click the Horizontal layout icon or Vertical layout icon icon to configure the layout of multiple model mappings. Click the Copy icon icon to copy the currently selected model mapping and add a new one with the same configuration.

    • Type: The type of model mapping.

    • Model Resource Link: The resource URL for the model mapping.

    • Scaling Size: Set the scaling ratios for the model mapping on the x-axis, y-axis, and z-axis. The value ranges from 0.01 to 100.

  • Interaction: Sets the interaction style for buildings.

    Parameter

    Description

    Click Interaction

    Turn the Click Interaction switch on or off to control whether a building can be picked when clicked.

Data panel

Reselect Data: Click Reselect Data to open the Select Range dialog box. You can then reselect the data range for the building layer. For more information, see Create a project using official base data.

Refresh Data: Refreshes the data that has been added to the layer.

Blueprint interactions

  1. In the Layer List on the left side of the scene editor, click the Export to blueprint editor icon next to the Building layer.

  2. Click the 蓝图图标 icon in the upper-left corner of the page.

  3. On the blueprint editor page, click the Building layer in the Import Node section. The configuration parameters for the building layer appear as a node on the canvas, as shown in the following figure.

    • Events

      Event

      Description

      On Data API Request Complete

      This event is triggered after the data API request returns a response and the data is processed by a filter. The event also outputs the processed data in JSON format. For a data example, see the Data Response area on the Data tab of the widget's configuration panel in the canvas editor.

      Rendering Complete

      This event is triggered when the building widget finishes rendering. It also outputs data of the object type.

      Left-click

      When you left-click, this event is triggered and outputs data of the object type. This event is active only when the interaction switch is on.

    • Actions

      Action

      Description

      Request data API

      Requests data from the server-side again. Data from input data processing nodes or layer nodes is used as parameters. For example, if a building is configured with the API data source https://api.test, and the data passed to the Request data API action is { id: '1'}, the final API request is https://api.test?id=1.

      Import data

      The data is processed in the component's drawing format, imported to the component, and then the component is redrawn. You do not need to request server-side data again. For a data example, see the Data Response area on the Data tab of the configuration panel to the right of the component in the canvas editor.

      Show component

      Shows the component. No parameters are required.

      Hide component

      Hides the component. No parameters are required.