Skip to content

The Data Points Map widget help you to display measurements and device locations on map. Runtime installation is available. Created by Global Presales.

License

Notifications You must be signed in to change notification settings

hnaether-c8y/cumulocity-data-points-map-widget

 
 

Repository files navigation

Data Points Map Widget for Cumulocity

The Data Points Map widget help you to display measurements and device locations on map.

Features

  • Data Points: Display measurements in terms of data points on map across geographical location.

  • Cluster Map: Configurable switch to show cluster map for large set of devices.

  • Configurable Color: Select custom color for your device markers on map.

  • Configurable Zoom: Select and configurable zoom which is best fit for your map.

  • Support single device and group devices: Based on configuration during widget configuration.

Installation

Runtime Widget Deployment?

  • This widget support runtime deployment. Download Runtime Binary and follow runtime deployment instructions from here.

Installation of widget through Appbuilder or Cockipt Deployment?

Supported Cumulocity Environments:

  • App Builder: Tested with Cumulocity App Builder version 1.2.2.

  • Cockpit Application: Tested with Cockpit 1006.6.8 with Patch Fix.

Requirements:

  • Git

  • NodeJS (release builds are currently built with v12.19.0)

  • NPM (Included with NodeJS)

External dependencies:


"angular-resize-event": "^1.1.1"

"fontawesome": "4.7.2"

"leaflet-extra-markers": "^1.2.1"

"leaflet2": "npm:leaflet@^1.6.0"

"@angular/material": "8.2.3"

"leaflet.markercluster": "^1.4.1

Installation Steps For App Builder:

Note: If you are new to App Builder or not yet downloaded/clone app builder code then please follow App builder documentation(Build Instructions) before proceeding further.

  1. Open Your existing App Builder project and install external dependencies by executing below command or install it manually.

    
    npm i angular-resize-event@1.1.1 fontawesome@4.7.2 leaflet-extra-markers@1.2.1 leaflet2@npm:leaflet@^1.6.0 @angular/material@8.2.3 leaflet.markercluster@1.4.1
    
    
  2. Grab the Data Points Map Latest Release Binary.

  3. Install the Binary file in app builder.

    
    npm i <binary file path>/gp-data-points-map-x.x.x.tgz
    
    
  4. Copy datapoints-map.less file from here and paste it at /cumulocity-app-builder/ui-assets/

  5. Open index.less located at /cumulocity-app-builder/ui-assets/

  6. Update index.less file with below Material theme. Import at first line in file/beginning of file(Please ignore this step if it already exist).

    
    @import '~@angular/material/prebuilt-themes/indigo-pink.css';
    
    
  7. Update index.less file with below datapoints-map.less. Import at last line/end of file.

    
    @import  'datapoints-map.less';
    
    
  8. Import GpDataPointsMapModule in custom-widget.module.ts file located at /cumulocity-app-builder/custom-widgets/

    
    import {GpDataPointsMapModule} from  'gp-data-points-map';
    
    @NgModule({
    
    imports: [
    
    GpDataPointsMapModule
    
    ]
    
    })
    
    
  9. Congratulation! Installation is now completed. Now you can run app builder locally or build and deploy it into your tenant.

    
    //Start App Builder
    
    
    npm run start
    
    // Build App
    
    
    npm run build
    
    
    // Deploy App
    
    
    npm run deploy
    
    
    

Installation Steps For Cockpit:

Note: If you are new to Cockpit or not yet created any cockpit application then please follow Web SDK for Angular before proceeding further.

  1. Open Your existing Cockpit/Cumulocity project and install external dependencies by executing below command or install it manually.

    
    npm i angular-resize-event@1.1.1 fontawesome@4.7.2 leaflet-extra-markers@1.2.1 leaflet2@npm:leaflet@^1.6.0 @angular/material@8.2.3 leaflet.markercluster@1.4.1
    
    
  2. Grab the Data Points Map Latest Release Binary

  3. Install the Binary file in your project.

    
    npm i <binary file path>/gp-data-points-map-x.x.x.tgz
    
    
  4. Copy datapoints-map.less file from here and paste it at /cumulocity-app/branding/

    Note: If you don't find branding folder then please follow Cumulocity Branding

  5. Open branding.less located at /cumulocity-app/branding/

  6. Update branding.less file with below Material theme. Import at first line/begining of file(Please ignore this step if it already exist).

    @import '~@angular/material/prebuilt-themes/indigo-pink.css';  
    
    
  7. Update branding.less file with below datapoints-map.less. Import at last line/end of file.

    
    @import  'datapoints-map.less';
    
    
  8. Import GpDataPointsMapModule in app.module.ts file located at /cumulocity-app/

    
    import {GpDataPointsMapModule} from  'gp-data-points-map';
    
    @NgModule({
    
    imports: [
    
    
    GpDataPointsMapModule
    
    
    ]
    
    })
    
    
    
  9. Congratulation! Installation is now completed. Now you can run your app locally or build and deploy it into your tenant.

    
    //Start App Builder
    
    
    
    npm run start
    
    
    
    // Build App
    
    
    
    npm run build
    
    
    // Deploy App
    
    
    
    npm run deploy
    
    
    

Build Instructions

Note: It is only necessary to follow these instructions if you are modifying/extending this widget, otherwise see the Installation Guide.

Requirements:

  • Git

  • NodeJS (release builds are currently built with v12.19.0)

  • NPM (Included with NodeJS)

Instructions

  1. Clone the repository:

    
    git clone https://github.com/SoftwareAG/cumulocity-data-points-map-widget.git
    
    
  2. Change directory:

    
    cd cumulocity-data-points-map-widget
    
    
  3. (Optional) Checkout a specific version:

    
    git checkout <your version>
    
    
    
  4. Install the dependencies:

    
    npm install
    
    
  5. (Optional) Local development server:

    
    npm run start
    
    
  6. Build the app:

    
    npm run build
    
    
  7. Deploy the app:

    
    npm run deploy
    
    

QuickStart

This guide will teach you how to add widget in your existing or new dashboard.

NOTE: This guide assumes you have followed the Installation instructions

  1. Open you application from App Switcher

  2. Add new dashboard or navigate to existing dashboard

  3. Click Add Widget

  4. Search for Data Points Map

  5. Select Target Assets or Devices

  6. Select Measurement from dropdown

  7. Click Save

Congratulations! Data Points Map is configured.

User Guide

  • Target assets or devices: User can select a device or a group. Based on device/group, list of devices will be display on Map. Only those devices are visible on map where position attributes are configured.

  • Cluster Map: User can switch to cluster map.

  • Select Measurements: Based on selected assets or devices, this field will be populated with available measurements/data points. User can select any one measurement which is applicable for selected device or group of devices.

  • Dashboard Field(Application Builder only): User has ability to provide device object field which represent dashboard Id. Based on this field, data points map will display navigation link for particular device(optional).

  • TabGroup Field(Application Builder only): User has ability to provide device object field which represent dashboard tab group name. Based on this field, data points map will display navigation link for particular device(optional).

  • Default Zoom: User has ability to change outdoor zoom level. Default is Auto

  • Marker Color: User can select maker color from color picker or enter manually. If more than one color selected from color picker, only first color will be applied. This is optional field.

  • Marker Font Color: User can select maker color from color picker or enter manually. If more than one color selected from color picker, only first color will be applied. This is optional field.

Data Points Map On Screen Options:

  • Realtime: Realtime measurements are activated by default. Use can click on it to on/off real time measurements.

  • Reload: Useful for force reload/refresh map.


This widget is provided as-is and without warranty or support. They do not constitute part of the Software AG product suite. Users are free to use, fork and modify them, subject to the license agreement. While Software AG welcomes contributions, we cannot guarantee to include every contribution in the master project.


For more information you can Ask a Question in the TECHcommunity Forums.

You can find additional information in the Software AG TECHcommunity.

About

The Data Points Map widget help you to display measurements and device locations on map. Runtime installation is available. Created by Global Presales.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.3%
  • HTML 1.2%
  • Other 1.5%