AMAP

Updated at:

Simple Log Service provides built-in AMAP charts, such as point maps and heat maps. When you use the ip_to_geo function in a query statement, Simple Log Service displays the analysis results on a map. This topic describes a configuration example and the general configurations for AMAP.

Introduction

This uses a map as a background to display geographic data using graph colors and image marks. The basic components are as follows:

  • Map canvas

  • Color blocks

Configuration example

  1. Log on to the Simple Log Service console. In the Projects section, click the project you want.

    image

  2. In the left-side navigation pane, choose Dashboard > Dashboards. In the Dashboard list, click the dashboard you want. In the upper-right corner of the dashboard page, click Edit. In edit mode, choose Add > Add Chart.

  3. On the right side of the page, configure Chart Type, Map Configurations, and Query and Analysis Configurations. On the left side of the page, configure the time range, Logstore, and query statement. Then, click Apply at the top of the page to view the chart.

    The query statement to query and analyze region information is as follows:

    Important

    To use AMAP, obtain the latitude and longitude using the ip_to_geo function.

    * | select ip_to_geo(remote_addr) as address, count(1) as count group by address order by count desc limit 20

General configurations

General configurations apply to the entire chart.

  • Basic configurations

    Parameter

    Description

    Title

    The chart title.

    Display Title

    Shows the chart title when enabled.

    Display Border

    Shows a border around the chart when enabled.

    Display Background

    Shows a background color for the chart when enabled.

    Display Time

    Shows the query time in the chart when enabled.

    Fixed Time

    Locks the query and analysis time range so that it is not affected by the dashboard's global time setting.

  • Map configurations

    Parameter

    Description

    Enable Scroll to Zoom

    Lets you scroll the mouse wheel to zoom in or out of the map.

    Enable Drag

    Lets you drag the map to change its position.

  • Query and analysis settings

    Parameter

    Description

    Latitude and Longitude

    Select the field that represents the latitude and longitude.

    Value Column

    Select the field that provides the values to display.