Background image layer (v4.x)

更新时间:
复制 MD 格式

Configure the background image layer to set a custom image as the background for a basic flat map.

Chart style

The background image layer is a sub-widget of the Basic Flat Map 4.0 that sets a custom image as the map background.{ED0F5ED3-D721-4361-8E5E-B70894C98DF7}

Style panel{96988101-F6B3-4516-8B5B-F1E7173BCE9B}

  • Search Configuration: Click the image icon in the upper-right corner of the Style panel to search for configuration items by name. Fuzzy matching is supported. Search for a configuration item.

  • General: General settings for the background image layer.

    Parameter

    Description

    Visibility Level

    The visibility level of the background image layer. The layer is visible only within the specified level range.

    Opacity

    The opacity of the background image layer, ranging from 0 to 100%. A larger value makes the layer more opaque.

  • Graphic: Graphic settings for the background image layer.

    Parameter

    Description

    Fill Type

    The fill type for the background image. Valid values: Image Fill and Texture Tile.

    Image Shape

    The style of the image shape. Select one of the three built-in styles from the drop-down list, enter an image URL to use a remote image, or click the 上传按键 icon to upload a local image. This parameter is available only when Fill Type is set to Image Fill.

    Fill Method

    The method used to fill the background with the image. Valid values: Fill, Fit, and Stretch. This parameter is available only when Fill Type is set to Image Fill.

    Texture Shape

    The style of the texture shape. Select one of the nine built-in texture styles from the drop-down list, enter a texture image URL to use a remote image, or click the 上传按键 icon to upload a local texture image. This parameter is available only when Fill Type is set to Texture Tile.

    Tile Size

    The width and height of the tiled texture image, ranging from 0 to 100 px. This parameter is available only when Fill Type is set to Texture Tile.

Data Source panel{45878CC0-3D72-44C4-9F08-B406F23B4F39}

Field

Description

geometry

The data range for the clipping border of the background image fill. Default: the entire map of China.

Data Item Configuration

Description

Data Source

The component's data source displays the data fields contained within the component using code editing or visual editor. You can also modify the data type to flexibly configure the component's data.

Data Mapping

When you need to customize chart field configurations, you can set different field mappings in the Data Mapping module to map these fields to the corresponding fields of the component. This allows for real-time data matching without altering the data source fields. Additionally, click the image icon to configure field styles individually.

Filter

Open the Filter to select an existing data filter or create a new one, and configure the data filter script to achieve data filtering capabilities. For more information, see manage data filters.

Data Response Result

This feature displays the component's data in real-time. When the component's data source changes, the data response result will display the latest data accordingly. In case of a delayed system response, you can click the image icon on the right to check the current data response result, or click the image icon on the right to obtain the most recent data for the component. You can also click to view examples to see sample response results for the current component.

Disable Loading State

Check the check box to hide the loading content during component updates and data dashboard previews. Unchecking will display the loading content. The default setting is unchecked.

Controlled Mode

Check the check box to prevent data requests upon the component's initialization. Data requests will only be initiated through global variables or methods configured in the blueprint editor. Unchecking allows for automatic update requests. The default setting is unchecked.

Automatic Update Request

Check the check box to manually set the polling frequency for dynamic polling. Clearing this option disables automatic updates, requiring manual page refreshes or data request triggers through the blueprint editor and global variable events for updates.

Advanced panel

{2EFDD899-F4BE-4E0A-9C71-3E6857376018}

Configure interaction events or associate global variables for filter interactions between widgets. Configure widget interactions.

Blueprint interaction

  1. Click the image icon in the upper-left corner of the page to open the Blueprint page.

  2. On the Layer Node tab, add the current widget to the main canvas.

  3. View the blueprint configuration parameters.{B8726586-B42C-42AD-9F74-55F6309B9CCC}

    Note

    Click the image icon in the anchor point area on the right to view event and action parameter tooltips.

    • Events

      Event

      Description

      When Data Is Updated

      Triggered when the data response changes. Returns the updated data.

      When Request Status Changes

      Triggered when the data request status changes, for example, to success or failure. Returns the updated status.

      Loaded Components

      Triggered after a data API response is processed by a filter. Outputs the processed data in JSON format. For a data example, see the Data Response Result area on the Data Source tab in the component's configuration panel on the right side of the canvas editor.

    • Actions

      Action

      Description

      Import data

      Imports data in the component's drawing format and redraws the component without re-requesting server-side data. For a data example, see the Data Response area on the Data Source tab in the configuration panel to the right of the component in the canvas editor.

      Request data

      Re-requests server-side data, using the output from upstream data processing nodes or layer nodes as parameters. For example, if the API data source for a background image layer is set to https://api.test, and the data passed to the Request data action is { id: '1'}, the final request URL is https://api.test?id=1.

      Toggle visibility

      The Toggle Visibility, Show, and Hide actions do not require parameters by default. You can add animation configurations as needed. See the data example.

      {
        // Animation type. Optional values: appear|fade|slideToUp. The default is fade. If left blank, there is no animation.
        "animationType": "fade",
        // Animation duration. The default is 1000 ms.
        "animationDuration": 1000,
        // Animation curve. Optional values: linear|easeInOutQuad|easeInOutExpo. The default is linear.
        "animationEasing": "linear"
      }

      Show

      Hide

      Update component configuration

      Dynamically updates the style configuration of the component. To get the configuration data, click Copy configuration to clipboard on the component's Style panel. Then, modify the style field values in the data processing node on the blueprint editor's configuration page as needed.