Show contents 

Data Analysis and Building Reports > Plugins > Connecting External Map Services to Map

Connecting External Map Services to Map

To enhance capabilities of displaying a map one can connect external map services: Yandex, Bing, ArcGis, OpenStreetMap, Google.

NOTE. External map services can be connected to a map in the tools: DashboardsAnalytical Queries (OLAP)Time Series Analysis only in the web application and in the designer of business applications.

To connect external map services to a map:

  1. Download the MapPlugins.zip archive with plugins for external map services.

IMPORTANT. After connecting plugins you get access to external map services API. Make sure that you have permissions to use them. The FORESIGHT company does not grant you any permissions to use external map services and is not responsible for violation of their licensing policy by you.

  1. Unarchive the plugins and place them in the corresponding folder with installed web application or designer of business applications.

The path to the folder in the web application:

The path to the folder in the designer of business applications:

  1. Add plugins description in the config.json/PP.xml configuration file for the web application or config.json/DBA.config.json for the designer of business applications.

When connecting plugins for external map services, make sure to specify description of the ExternalMapPlugin plugin in the config.json configuration file. This plugin is a basic class for connected plugins.

In the config.json file for the web application/designer of business applications use the plugins field to describe plugin:
"plugins": [
    {
        "id": "PP.ExternalMapPlugin",
        "path": "./build/ExternalMapPlugin.js",
        "name": "ExternalMapPlugin"
    },
    {
        "id": "PP.Yandex",
        "path": "./build/YandexMapPlugin.js",
        "name": "YandexMapPlugin"
    },
    {
        "id": "PP.Bing",
        "path": "./build/BingMapPlugin.js",
        "name": "BingMapPlugin"
    },
    {
        "id": "PP.ArcGis",
        "path": "./build/ArcGisMapPlugin.js",
        "name": "ArcGisMapPlugin"
    },
    {
        "id": "PP.OpenStreetMap",
        "path": "./build/ArcGisMapPlugin.js",
        "name": "OpenStreetMapPlugin"
    },
    {
        "id": "PP.Google",
        "path": "../build/GoogleMapPlugin.js",
        "name": "GoogleMapPlugin",
        "param":[{
            "name": "APIKey",
            "value": "AIzaSyCT36DH2CuXQ8GHtNSZASvoxQtbidhuWCU"
        }]
    }
]
To describe plugins in the PP.xml file, use the <plugins> section:
<plugins>
    <plugin name="ExternalMapPlugin" path="../build/ExternalMapPlugin.js" loaded="true"/>
    <plugin name="YandexMapPlugin" path="../build/YandexMapPlugin.js" type="PP.Yandex"/>
    <plugin name="BingMapPlugin" path="../build/BingMapPlugin.js" type="PP.Bing"/>
    <plugin name="ArcGisMapPlugin" path="../build/ArcGisMapPlugin.js" type="PP.ArcGis"/>
    <plugin name="OpenStreetMapPlugin" path="../build/ArcGisMapPlugin.js" type="PP.OpenStreetMap"/>
    <plugin name="GoogleMapPlugin" path="../build/GoogleMapPlugin.js" type="PP.Google">
        <params>
            <!-- Specify API key if required -->
            <param name="APIKey" value="AIzaSyCT36DH2CuXQ8GHtNSZASvoxQtbidhuWCU"/>
        </params>
    </plugin>
</plugins>
To describe the plugin in the DBA.config.json file, use the plugins field:
"plugins": [
    {
        "Type": "PP.Yandex",
        "Path": "../build/YandexMapPlugin.js",
        "Name": "YandexMapPlugin",
        "Loaded": true
    },
    {
        "Type": "PP.Bing",
        "Path": "../build/BingMapPlugin.js",
        "Name": "BingMapPlugin",
        "Loaded": true
    },
    {
        "Type": "PP.ArcGis",
        "Path": "../build/ArcGisMapPlugin.js",
        "Name": "ArcGisMapPlugin",
        "Loaded": true
    },
    {
        "Type": "PP.OpenStreetMap",
        "Path": "../build/ArcGisMapPlugin.js",
        "Name": "OpenStreetMapPlugin",
        "Loaded": true
    },
    {
        "Type": "PP.Google",
        "Path": "../build/GoogleMapPlugin.js",
        "Name": "GoogleMapPlugin",
        "Loaded": true,
        "Params":{
            "Param":[{
                "Name": "APIKey",
                "Value": "AIzaSyCT36DH2CuXQ8GHtNSZASvoxQtbidhuWCU"
            }]
        }
    }
]
  1. Restart the web server.

  2. Open the report for edit and select one of the available map services in the drop-down menu of the External Services button located on the Map ribbon tab:

NOTE. The External Services button is hidden by default.

After executing the operations, external map services will be connected to a map.

IMPORTANT. After connecting plugins you get access to external map services API. Make sure that you have permissions to use them. The FORESIGHT company does not grant you any permissions to use external map services and is not responsible for violation of their licensing policy by you.

The example of a map with connected Google service:

Features of Use of External Map Services

When using external map services take into account the following features of their use:

See also:

Plugins | Advanced Map Features