Custom Image as Map Border

  • Last update:January 15, 2025
  • Overview

    Application Scenario

    • You want to customize layers, for example, to divide areas as needed instead of using built-in layers.

    • You want the map to display the sales volume of each store in a mall after you import the mall map into FineReport.

    • You have an effect map and want to customize the area and parameters of it, for example, to create a mall map, a workshop map, or other maps, as shown in the following figure.

    previwe.gif

    Implementation Method

    You need to add a custom image type map border on the map configuration panel in the decision-making system. When designing the map, select Custom Image in the drop-down list of Map Border.

    image 10.png

    Example

    Customizing the Map Border

    1. Enter the decision-making system, choose System Management > Map Configuration > Custom Image, select the custom image directory, click image 30.png to add a custom image, set the name of the custom map boundary as 2F Mall, and click OK, as shown in the following figure.

     image 11.png

    2. Select the created map border 2F Mall and click the Import Image button on the right to import a floor plan of the second floor of the shopping mall, as shown in the following figure.

    iconNote:
    Imported images will be resized automatically and can also be freely scaled by scrolling the mouse wheel.

    image 12.png

    3. Click the Rectangle icon to outline the area of each store, set the area name to the corresponding store name, and click Save in the upper right corner, as shown in the following figure.

    iconNote:
    If the area is in an irregular shape, you can click the Polygon icon for delineation.

    gif1.gif

    4. The custom map border is created and the generated JSON file is saved to %FR_HOME%\webapps\webroot\WEB-INF\assets\map\image, as shown in the following figure.

    image 13.png

    Component Creation

    Data Preparation

    Create a built-in dataset market with 3 fields: store name, product, and brand, as shown in the following figure.

    image 15.png

    Chart Insertion

    Merge required cells, insert a chart by choosing Map > Area Map, and clicking OK, and choose Custom Image > 2F Mall from the drop-down list of Map Border, as shown in the following figure.

    image 14.png

    Data Binding

    Bind the data to the chart, as shown in the following figure.

    image 16.png

    Style Setting

    1. Deselect Show Legend to hide the legend.

    2. Select Use Label, select Area Name as Text, and click Format to customize the character format.

    3. Select Series as Color Section, select Custom Combination as Color Scheme, and set Opacity to 100%.

    4. Select Area Name and Value for Text in Prompt.

    image 23.png

    Effect Display

    PC

    Save the template and click Pagination Preview. The effect is shown in section "Application Scenario."

    Mobile Terminal

    The template can be previewed on both the DataAnalyst app and the HTML5 terminal. The following figure shows the effect.

    c92633d76149d7ec5832de0de54f679.jpg

    Template Download

    For details, you can click to download the template Custom Mall Map.cpt.

    Notes

    File Placement Server Needing the Synchronized Geographic Files

    If the generated custom image JSON file is copied to the server for use, the geographic files need to be synchronized in Map Configuration in the decision-making system. For more details, see Map Configuration Section 2.4.

    image 24.png

    Label and Prompt Hiding

    After enabling the range legend, and if the label and prompt are not displayed as shown in the following figure, you need to modify the corresponding fields of the values to numeric type, or change the legend into a regular legend.

    image 29.png

    Image Size Limit

    The size limit for uploading images is 2M, which is the default post size limit for Tomcat. You can set it to unlimited as needed.

    Offline Use of Custom Images

    In FineReport of versions 11.0.6 and later versions, the Custom Image layer requires the Internet connection to request resources from AMap API, otherwise the layer will not be displayed.

    1. In an intranet environment, the white-listed domain names of AMap API with open standard styles can be used, including: webapi.amap.com, vdata.amap.com, restapi.amap.com.

    2. In other intranet situations, you can install the Intranet Supporting Custom Maps plugin.

    After installing the plugin, the page for the custom image function will be the same as that in version 11.0.5 and earlier, without supports to the new drawing tools added in version 11.0.6.

    iconNote:
    After installing the plugin, whether you are connected to the internet or not, you can call the plugin function to configure custom images. If the plugin is not installed, you can still use the current version's map configuration function normally.
    • In FineReport 11.0.5 and Earlier Versions

    image 25.png

    • In FineReport 11.0.6 and Later Versions

    image 26.png

    Attachment List


    Theme:
    • Helpful
    • Not helpful
    • Only read

    滑鼠選中內容,快速回饋問題

    滑鼠選中存在疑惑的內容,即可快速回饋問題,我們將會跟進處理。

    不再提示

    10s後關閉

    Get
    Help
    Online Support
    Professional technical support is provided to quickly help you solve problems.
    Online support is available from 9:00-12:00 and 13:30-17:30 on weekdays.
    Page Feedback
    You can provide suggestions and feedback for the current web page.
    Pre-Sales Consultation
    Business Consultation
    Business: international@fanruan.com
    Support: support@fanruan.com
    Page Feedback
    *Problem Type
    Cannot be empty
    Problem Description
    0/1000
    Cannot be empty

    Submitted successfully

    Network busy