Successfully!

Error!

Map Configuration

  • Last update:  2024-03-04
  • Overview

    Version

    Report Server Version

    Functional Change

    11.0

    /

    11.0.6

    Allowed to merge existing geographic areas into new areas and select a circular area under Geographic Information > Area. Added a built-in directory China (region). For details, see section "Geographic Information."

    Maps supplied by Amap and WMTS can be imported under Custom GIS Layer. For details, see section "Custom GIS Layer."

    Application Scenarios

    FineReport designer can display data information related to geographic locations through maps, and the corresponding information can be set under Map Configuration.

    You can use the Map Configuration function to customize map boundaries and GIS layers by selecting the corresponding map boundary in the designer.

    iconNote:
    1. FineReport V11.0.6 optimized the map. You are advised to use Chrome for preview.

    2. In FineReport V11.0.6 and later versions, the Map Configuration page requires access to internet to request Amap API resources. Otherwise, geographic information and custom images and layers cannot be displayed.

    On the intranet, the following domain names (the standard-style Amap API) are included in the whitelist: webapi.amap.com, vdata.amap.com, and restapi.amap.com.

    Functions

    1. In the designer, choose Server > Map Configuration, log in to the decision-making platform, and you are redirected to the map configuration page.

     

    2. Choose Server > Platform Management in the designer, log in to the decision-making platform, and choose System Management > Map Configuration.

     

    3. Three configuration pages under Map Configuration:

    • Geographic Information: You can customize the information of map area boundries and points.

    • Custom Image: You can use a custom image as the map boundary.

    • Custom GIS Layer: You can add predefined GIS layers.

    Geographic Information

    iconNote:
    The China (Region) file is added in FineReport V11.0.6. You need to update the map file resources for use.

    The geographic information page is shown in the following figure.

     

    The following table introduces the functions corresponding to each number area.

    Number

    Function

    Explanation

    1

    Geographic information directory

    Directory name, namely map boundary name You can create, copy, delete,   and rename directories.

    2

    Map type

    You can select Area or Point as the map type.

    3

    Map editing and display

    You can edit the map with the selected tool and the effect will be displayed immediately after saving. You can also click an area to view its information, including the name, center point, and ID. The selected area can be modified and deleted.

    4

    Editing tools

    Editing tools include (from top to bottom): zooming in, zooming out,   polygonal selection, rectangular selection, circular selection, merging,   editing, and deletion.

    5

    Area list

    You can directly modify the name, longitude, and latitude of an area in the list and tick areas in the list to merge them.

    Click the icon to collapse or expand the list.

    6

    Save/Reset


     
    After   modifying the configuration, click Save to save the modification, which takes effect immediately. Clicking Reset before saving can undo the   modification.

    7

    Sync geo files

    You can manually add, delete, or modify geographic files, custom images,   and JSON files under the path %FR_HOME%\webapps\webroot\WEB-INF\assets\map. Click Sync Geo File to synchronize the modification in the designer.

    Adding/Copying a Directory

    To customize a new map boundary, you need to first add or copy a directory and name it.

    Adding a Directory

    Select an existing directory as the parent directory, click the ADD icon in the upper right corner of the directory, enter its name, and click OK.

     

    Located under its parent directory, the new directory has no geographical information.

     

    Copying a Directory

    Select the required directory, click the COPY icon, set the name and parent directory in a pop-up window, and click OK, as shown in the following figure.

    iconNote:
    Only the selected directory (without its subdirectories) is copied.

     

    The new directory contains the geographical information of the original directory.

     

    Map Editing Tool

    Selection Tool

    Select the new directory, pick a selection tool in the map editor, and follow the tooltips to draw a custom area. After you click Finish, a configuration box pops up, displaying the default area name and center point which can be modified.

    The demonstration of polygonal, rectangular, and circular selection tools is shown in the following figure.选取.gif

    Merging Tool

    For maps with selectable areas, you can click the MERGE icon and choose areas to be merged by clicking them on the map or ticking them in the area list, as shown in the following figure.

    iconNote:
    Unmerging is not supported. To undo a merging, you can only click Reset before saving.

    合并.gif

    Editing/Deletion Tool

    For maps with editable areas, you can click the EDIT icon to edit the shape and size of a selected area. To delete an area, click the DELETE icon, select the area on the map, and click Finish, as shown in the following figure.

    删除.gif

    Point Marker

    The area map and point map under the same directory do not affect each other. To change the point map information, select a directory, click the EDIT icon, and you can edit points on the map. No available tools for selection or merging in the point map. To add a point on the map, you can click the MARKER icon.

     

    Save/Reset

    After configuration, click Save in the upper right corner. Then the system generates two JSON files named {name}-area.json and {name}-point.json under the path %FR_HOME%\webapps\webroot\WEB-INF\assets\map\geographic\ to save the custom geographic information.

     

    Thus, you cannot reset the configuration after saving.

    Sync Geo File

    You can manually add, delete, or modify geographic files, custom images , and JSON files under the path %FR_HOME%\webapps\webroot\WEB-INF\assets\map. Click Sync Geo File to synchronize the modification under that directory.

     

    In remote design mode, these JSON files can be copied and pasted directly on the server. Note that the {name}-area.json file and {name}-point.json file need to be pasted simultaneously in the same folder under the path webroot\WEB-INF\assets\map on the server.

    Next, click Sync Geo File and click the REFRESH icon under Type in the designer. 

    Custom Image

    Custom image: Use an image as the map boundary, and you can draw areas or points within the image.

    iconNote:
    The maximum size of the image to be loaded is 2MB, which is the default maximum size of the POST in Tomcat.

    Adding a Directory

    To upload a custom image, you can only add a directory. Similarly, select a parent directory, click the ADD icon, name the new directory, and click OK.

     

    Select the newly created directory and click Import Picture.

     

    Editing Tool

    In Custom Image, editing tools include zooming in, zooming out, polygonal selection, rectangular selection, circular selection, marker, merging, editing, and deletion. The using method is the same as that of the tools in Geographic Information, and you can refer to the demonstration figure in that section.

     

    After configuration, click Save. The generated JSON file is saved under the path %FR_HOME%\webapps\webroot\WEB-INF\assets\map\image.

    Custom GIS Layer

    GIS layers contain information such as administrative divisions, road traffic, and boundary delineation across the world. Additionally, different GIS layers correspond to different map styles.

    GIS layers can be customized on the decision-making platform, and applied to all maps on the current server.

    The following table introduces four ways to customize GIS layers.

    GIS Layer Type

    Explanation

    Notes

    TileLayer

    For details, see Custom TileLayer.

    TileLayer can be directly customized in the designer.

    WMS

    For details, see Custom WMS and WMTS.

    Amap

    /

    Amap is added in FineReport V11.0.6 and cannot be customized directly in   the designer.

    WMTS

    For details, see Custom WMS and WMTS.

     

    Custom JSON Resource

    Resource Downloading

    The following table provides some custom JSON resources that can be directly downloaded and then used in the corresponding directory, which are provided by FineReport or voluntarily uploaded by users.

    Clicking to  Download the File

    Note

    Custom shopping mall.zip

    Mall map

    2Fmarket.zip

    2nd floor mall map

    heatmap.zip

    Webpage area heat map

    Custom Image Map.zip

    Counter map

    Taiwan (China).zip

    Taiwan (China) Map

    map.zip

    World map & China map

    If you customize only one JSON file, you need to manually add the other JSON file and click Sync Geo File under Map Configuration.

    Here are two empty JSON files: Empty JSON.zipRename them for use.

    iconNote:
    If you voluntarily provide your own custom JSON map, you can post it on the forum. If it is adopted, you will be rewarded with virtual coins.

    JSON File Format

    In addition to creating maps on the front end, you can also directly write maps on the back end. The specific JSON file format is shown in the following figures.

    iconNote:
    Pay attention to the calculation rules for map center points when writing maps.


    Area Map

     

    Point Map

     

    Loading Resource

    1. Place the JSON file in the image folder under the path webapps\webroot\WEB-INF\assets\map.

    2. On the decision-making platform, choose System Management > Map Configuration, and click Sync Geo File.

     

    Notes

    Migrating Old Maps to New Projects

    Assume that the background and layers of a map have been customized on the old server. If you want to migrate the map from the old server to the newly deployed server, you can copy all the files in the assets folder under the path %FR_HOME%\webapps\webroot\WEB-INF on the old server and paste them in the same directory on the new server, choose System Management > Map Configuration, and click Sync Geo File.

    Disappearance of District and County Information within a City

    If the city name is modified, the information of districts and counties within the city all disappears.

    Others

    The administrative divisions data of built-in China map is obtained from the National Bureau of Statistics: http://www.stats.gov.cn/sj/tjbz/tjyqhdmhcxhfdm/2020/index.html
    . The data of Taiwan (China), Hong Kong (China), and Macao (China) is obtained from the Ministry of Civil Affairs:
    http://xzqh.mca.gov.cn/map.

     


    Attachment List


    Theme: Chart
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback