Geo-fence

Updated at:

A geo-fence is a data mapping layer in 3D City Builder. It displays the area of a polygon feature, such as a restricted traffic zone. A geo-fence supports independent style and data configurations, including the style of its top and side faces and its overlay mode. This topic describes the configuration items for a geo-fence.

In the layer list on the left side of the scene editor, click the Geo-fence layer to open its configuration panel. From this panel, you can configure the style and data for the Geo-fence layer.

Note

If the layer list does not include the Geo-fence, you must add the Geo-fence layer. For more information, see Add a subcomponent.

Style panelimage.png

  • Search Configuration: To quickly find a specific configuration item, click on the Configuration panel in the upper right corner and enter the item's name in the Search Configuration field. The system utilizes a fuzzy match to assist in locating items. For more information, see search configuration items.

  • General: General configuration parameters.

    Parameter

    Description

    Blending mode

    Set the blending and rendering mode for the material of the single-point column layer. Options are Additive, Normal, and None.

    Depth write

    Turn on the switch to enable depth write. Turn off the switch to disable it.

    Note

    If you enable depth write, this object may block objects behind it.

    Depth test

    Turn on the switch to enable depth test. Turn off the switch to disable it.

    Note

    If you enable depth test, this object may be blocked by objects behind it.

    Extrusion height

    Set the extrusion height of the geo-fence. A larger value makes the fence taller. The value can range from 0.2 to 2000.

    Start height

    Set the start height of the geo-fence. A larger value places the fence higher above the geoid. The value can range from -2000 to 2000.

  • Graphics: Graphics configuration parameters.

    Parameter

    Description

    Show top face

    Turn on the Show top face switch to set the color of the top face. Turn off the Show top face switch to hide the top face color settings.

    Top face color

    Set the color of the top face. This option is available only when the Show top face switch is on. For more information, see Color picker to change the color.

    Side face color

    Set the color of the side faces. For more information, see Color picker to change the color.

    Side face gradient

    Turn on the switch to apply a gradient to the side face color. Turn off the switch to use a solid color.

    Side face texture

    • In the Texture style area:

      • Hover over the image and click Delete to remove the current texture. Then, click the image area or drag a local image into the area to add a new side face texture.

      • Hover over the image and click Change to upload a different local image.

      • You can also enter a texture URL to use an image from a remote server as the side face texture.

      Note

      Textures must be in PNG or JPG format.

    • Texture color: Set the color of the side face texture. For more information, see Color picker to change the color.

    • UV tiling value: Adjust the UV tiling value of the side face texture on the x-axis and y-axis.

    Side face overlay texture

    • In the Texture style area:

      • Hover over the image and click Delete to remove the current texture. Then, click the image area or drag a local image into the area to add a new side face overlay texture.

      • Hover over the image and click Change to upload a different local image.

      • You can also enter a texture URL to use an image from a remote server as the side face overlay texture.

      Note

      Textures must be in PNG or JPG format.

    • UV tiling value: Adjust the UV tiling value of the side face overlay texture on the x-axis and y-axis.

  • Animation: Geo-fence animation configuration parameters.

    Parameter

    Description

    Animation mode

    Set the animation mode for the geo-fence. Options are Horizontal and Vertical.

    Movement speed

    Set the movement speed of the geo-fence.

    • Side face texture: Drag the slider to set the movement ratio of the side face texture. The value can range from 0 to 0.5.

    • Side face overlay texture: Drag the slider to set the movement ratio of the side face overlay texture. The value can range from 0 to 0.5.

  • Interaction: Geo-fence interaction configuration parameters.

    Parameter

    Description

    Mouse click

    Turn on the switch to enable mouse click interactions. Turn off the switch to disable them.

    Highlight color

    Set the highlight color for the fence. For more information, see Color picker to change the color.

    Callback ID

    Set the callback ID for the geo-fence.

Data panelimage.png

Field

Description

id

The ID of the geo-fence.

callback

The callback ID of the geo-fence.

geometry

The geometry coordinate value of the geo-fence.

colorField

The color of the geo-fence.

Configuration Item

Description

Controlled Mode

Turn on the switch to prevent the widget from requesting data upon initialization. Data is requested only through a callback ID or a method configured in the blueprint editor. Turn off the switch to allow automatic data update requests. The switch is off by default.

Automatic Update Request

Select this option to enable dynamic polling and manually set the polling frequency. If you clear this option, data is not updated automatically. You must manually refresh the page or trigger data update requests using the blueprint editor or callback ID events.

Data Source

Click Configure Data Source. In the Set Data Source panel, you can modify the data source type and data query code, preview the data source return results, and view the data response.

Data Result

Displays the response result of a data request. When the data source changes, click the 刷新图标 icon on the right to view the real-time data response.

Note

You can also use the layer data API as a block data API to configure more data source types in the data dashboard or to interact with data from common chart widgets. For more information, see One-click generation of block APIs.

If you created your 3D City Builder project in Spatial Data Project mode and the project contains data primitive layer content, you can use the Spatial Build Data Source to obtain spatial map data when you configure the data panel in the scene editor. The steps are as follows:

  1. In the layer configuration panel, select the Data tab. Click the Data Source Type drop-down list at the bottom of the panel and select Spatial Build Data Source.

  2. From the Data Project drop-down list at the bottom of the panel, select an existing data project from the spatial build platform.选择数据项目

  3. After you select a data project, select a matching dataset from the Dataset drop-down list.数据集面板

    Note

    If no configurable data types are available for the Data Project and Dataset configuration items, click Go to Spatial Build Platform to Manage Data in the panel to configure data in the spatial build platform. For more information, see Overview of spatial data management.

Blueprint interaction

  1. In the layer list on the left side of the Scenario Editor page, click the Export to Blueprint Editor icon next to Geo-fences.

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

  3. On the Blueprint Editor page, click the Geo-fence layer in the Import Nodes section. The configuration parameters for the Geo-fence layer appear on the canvas, as shown in the following figure.

    • Events

      Event

      Description

      When data API request is complete

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

      Left-click

      An event that is triggered when you left-click the geo-fence. It returns the click position and the raw data item.

    • Actions

      Action

      Description

      Request data API

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

      Import data API

      Processes data in the component's drawing format and then imports the data to redraw the component. This action does not request server-side data again. For data examples, see the Data Response area on the Data tab in the component's configuration panel in the canvas editor.

      Show component

      Shows the component. No parameters are required.

      Hide component

      Hides the component. No parameters are required.