The Data Points Map widget help you to display measurements and device locations on map.
⚠️ This project is no longer under development. Please use cumulocity-data-points-map-widget-plugin for Application Builder >=2.x.x and Cumulocity >=1016.x.x⚠️
APPLICATION BUILDER | CUMULOCITY | DATA POINTS MAP WIDGET |
---|---|---|
1.3.x | >= 1011.x.x | 2.x.x |
1.2.x | 1010.x.x | 1.x.x |
-
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.
- This widget support runtime deployment. Download Runtime Binary and use application builder to install your runtime widget.
Supported Cumulocity Environments:
- App Builder: Tested with Cumulocity App Builder version 1.3.0.
Requirements:
-
Git
-
NodeJS (release builds are currently built with
v14.18.0
) -
NPM (Included with NodeJS)
External dependencies:
"angular-resize-event": "^2.1.0"
"fontawesome": "4.7.2"
"leaflet-extra-markers": "^1.2.1"
"leaflet2": "npm:leaflet@^1.6.0"
"@angular/material": "11.2.13"
"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.
-
Open Your existing App Builder project and install external dependencies by executing below command or install it manually.
npm i angular-resize-event@2.1.0 fontawesome@4.7.2 leaflet-extra-markers@1.2.1 leaflet2@npm:leaflet@^1.6.0 @angular/material@11.2.13 leaflet.markercluster@1.4.1
-
Grab the Data Points Map Latest Release Binary.
-
Install the Binary file in app builder.
npm i <binary file path>/gp-data-points-map-x.x.x.tgz
-
Copy datapoints-map.less file from here and paste it at /cumulocity-app-builder/ui-assets/
-
Open index.less located at /cumulocity-app-builder/ui-assets/
-
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';
-
Update index.less file with below datapoints-map.less. Import at last line/end of file.
@import 'datapoints-map.less';
-
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 ] })
-
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
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
v14.18.0
) -
NPM (Included with NodeJS)
Instructions
-
Clone the repository:
git clone https://github.com/SoftwareAG/cumulocity-data-points-map-widget.git
-
Change directory:
cd cumulocity-data-points-map-widget
-
(Optional) Checkout a specific version:
git checkout <your version>
-
Install the dependencies:
npm install
-
(Optional) Local development server:
npm run start
-
Build the app:
npm run build
-
Deploy the app:
npm run deploy
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
-
Open you application from App Switcher
-
Add new dashboard or navigate to existing dashboard
-
Click
Add Widget
-
Search for
Data Points Map
-
Select
Target Assets or Devices
-
Select
Measurement from dropdown
-
Click
Save
Congratulations! Data Points Map is configured.
-
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.