InfoWindow layer

Updated at:

This article describes the infowindow layer of the icon style and the meaning of each configuration items.

Chart style

A infowindow layer is a subcomponent of a 3D spherical map. It supports independent styles and data configurations, including the size, color, content, longitude, and latitude of a floating frame. It is suitable for displaying specific geographic information on a large screen in the form of a floating frame.

Settings

  • 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.
  • Scale: the distance between the InfoWindow layer and the globe.

  • Description

    Size: the size of the InfoWindow layer.

Data tab

Configuration field description

Parameter

Description

type

The type of an info window.

id

The ID of an info window.

latlngs

The latitude and longitude where an info window is located.

content

The text content displayed in the floating frame. The text content contains the following fields.

  • title: the content of the title of the floating frame.

  • content: the content of the body of the floating box.

  • width: the width of the floating frame. Unit: pixels.

  • height: the height of the floating frame. Unit: pixels.

  • paddingLeft: the offset between the text content and the left side of the infowindow layer. Unit: px.

  • paddingRight: the offset of the body content from the right side of the infowindow layer. Unit: px.

  • paddingTop: the offset of the body content from the top of the infowindow layer. Unit: px.

  • titleFontSize: the font size of the caption.

  • titleColor: the color of the caption.

  • contentColor: the color of the body of the floating box.

  • contentFontSize: The font size of the body of the float box.

  • fontFamily: the font family of the title and body of the floating frame (please select the font installed in your system, if this font is not available in the system, the default font will be used).

  • bgImgUrl: the URL of the infowindow layer background image.

Table 1. Parameters
Parameter Description
Controlled Mode If you turn on the switch, data is not requested when a widget is initialized. Data requests are triggered only based on callback IDs or the method configured in Blueprint Editor. If you turn off the switch, data requests are automatically triggered. By default, the switch is turned off.
Auto Data Request After you select the Auto Data Request check box, you can enable dynamic polling, and manually specify the polling interval. If you do not select this check box, data is not automatically requested. You must manually refresh the page to request data or use Blueprint Editor or callback ID events to trigger data requests.
Data Source In the right-side panel of Canvas Editor, click the Data tab. Click Set next to Static Data. In the Configure Datasource panel, select a data source from the Data Source Type drop-down list. Enter code for data query in the code editor, click Preview Data Response to preview the response of the data source, and then view the response. For more information, see Configure asset data.
Data Filter If you select the Data Filter check box, you can convert the data structure, filter data, and perform simple calculations. If you click the plus sign (+) next to Add Filter, you can configure the script for the data filter in the editor that appears. For more information, see Use the data filter.
Data Response Result The response to a data request. If the data source changes, you can click the Refresh icon icon next to Data Response Result to view the data response in real time.

Interaction tab

This widget does not support interaction events.

Configure interactions in Blueprint Editor

  1. In Canvas Editor, click the icon on the right side of the infowindow layer in the sub-widget list of the 导出到蓝图编辑器3D globe map.

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

  3. In Blueprint Editor, click infowindow layer in the Imported Nodes pane. You can view the infowindow layer parameters in the canvas, as shown in the following figure. 浮框层蓝图参数

    • Event

      Event

      Description

      When the request is completed

      The event is triggered with the processed JSON data after a data interface request is responded and processed by a filter. For more information about specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

      When the request fails

      The event that is returned when a data interface request fails (the request may be due to network problems or interface errors) and is processed by the filter. The event also throws the processed JSON data. For more information about specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

    • Policy Action

      Policy Action

      Description

      Request Floating Frame

      This action is performed to request the server data again. The data sent by an upstream data processing node or layer node is used as a parameter. infowindow layer the API data source is configured as https://api.test and the data passed to the request floating frame action is { id: '1'}, the final request interface is https://api.test?id=1.

      Import a floating frame

      After data of a widget is processed in accordance with its drawing format, the widget is imported for redrawing. You do not need to request server data again. For more information about specific data examples, see the Data Response Result section of the Data tab in the right-side configuration panel of the canvas editor.

      Display Widget

      A widget is shown without the need to specify parameters.

      Hide components

      A widget is hidden without the need to specify parameters.