Successfully!

Error!

Map Introduction

  • Last update:  2020-12-18
  • I. Overview

    1) Map is the visualization of geographic information data.

    2) FineReport provides a variety of map types with multiple built-in layers, which can be used to implement functions such as zooming, location positioning, etc. This feature also supports map background customization and WMS offline map customization.

    3) For more information, please refer to Map Configuration, Chart Data, Chart Style, Chart Special Effects


    • Map Components

      • GIS Layer (Basemap)

      • Display Data

      • Display Type

    II. Map Components

    1. GIS Layer (Basemap)

    The GIS layer refers to the basemap of the displaying map. FineReport provides built-in Mapbox GIS layers in a variety of styles, custom layers are allowed as well. Please refer to GIS Background to add all the needed GIS layers in Map Configuration.

    Two types of custom layers are outlined as follows.

    1) Custom tileLayer

    A typical tileLayer is the tilemap data of Mapbox. You can generate the URL of a layer (such as https://api.mapbox.com/styles/v1/wangjun1303/ckd8o30i20wiu1in244hmlrgb/tiles/256/{z}/{x}/{y}@2x?access_token=pk.eyJ1Ijoid2FuZ2p1bjEzMDMiLCJhIjoiY2l4OHBscnYwMDAwdTJ5cWY5cnRrZGM0ZSJ9.FQy75sTd5x1dujqvTsLzvA) from its official website, and paste it to Type -> GIS Layer -> Custom tileLayer -> URL of any kind of map, and add copyright information of the map in Attribution.

    2) Custom WMS Service

    Using WMS Service from by map tools such as ArcGIS, maps can be displayed offline over LANs.

    Copy the URL of a generated WMS layer, such as http://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&BBOX=-180,-90,180,90&SRS=EPSG:4326&WIDTH=953&HEIGHT=480&LAYERS=bluemarble,cities&STYLES=&FORMAT=image/png&TRANSPARENT=true, and paste it to Type -> GIS Layer -> Custom tileLayer -> URL of any kind of map. Click 'Check' to check its validity, and corresponding options will be displayed for the valid URL.

     

    Note: the WMS format required by FineReport only needs the GetCapabilities request,  such as http://webmapping.mgis.psu.edu/geoserver/wms?. According to the corresponding WMS protocol, FineReport will further obtain the available layers for users to choose from, without the need for more detailed layer information.


    2. Display Data

    The displayed data refers to the visualized data such as areas and points shown on the basemap. For example, highlight the area of Southeast Asian countries on the GIS layer.

    1) The displayed data are saved as JSON resources under %FR_HOME % \webapps\webroot\WEB-INF\assets\map. The map data are stored in folder  'geographic' (includes the built-in maps of the world, China and Southeast Asian countries), while data of custom pictures in folder 'image'. For making pictures in browsers, please refer to Geographic Information and Custom Pictures.

    2) When written in scripts, the map JSON needs to be in the following format:

    • For area map

    {
      "type": "FeatureCollection",
      "features":
      [
        {/* Here below is the first region */
          "type": "Feature",
          "geometry":
          {
            "type": "MultiPolygon",
            "coordinates":
            /* Here stores the coordinate pairs of region multipolygon */
            [
              [
                [
                  117.210024,
                  40.082262
                ],
                [
                  117.344299,
                  40.13443
                ]
              ]
            ]
          },
          "properties":
          {
            "adcode": 110000,//Here is the area code
            "name": "Beijing",//Here is the area name
            "center":
            /* Here stores the coordinates of the center point*/ 
            [
              116.405285,
              39.904989
            ],
            "bbox":
            [
              115.426264,
              39.44296,
              117.49582,
              41.053072
            ]
          }
        }
        {/* Here is the second region */}
        {...}
        ...
      ]
    }
    • For point map:

    {
      "features":
      [
        {/* Here below is the first point */
          "geometry":
          {
            "coordinates":
            /* Here stores the coordinates of the point */
            [
              111.5547,
              22.1484
            ],
            "type": "Point"
          },
          "properties":
          {/*Point name*/
            "name": "Macau Special Administrative Region"
          },
          "type": "Feature"
        },
        {/* Here is the second point */}
        {...}
        ...
      ]
    }

    3) Data Matching Logic

    The area/point names in the map JSON will be matched before a map layer displays the data and metrics from database tables. If the matching process fails, consider modifying the values of area fields, or manually adjust to make both matched in the chart settings.


    3. Display Type

    Display Type means the data visualization form,  including points, areas, flows, or combinations of the above in various styles. The settings for different types of maps are introduced in four documentations,  which are Area Map, Point MapFlow  Map and Combination Map.

     


    Attachment List


    Theme: Chart
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    Doc Feedback