Code Monkey home page Code Monkey logo

softwareag / cumulocity-data-points-map-widget Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 2.0 821 KB

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

License: Apache License 2.0

JavaScript 0.94% TypeScript 97.23% CSS 0.42% HTML 1.19% Less 0.22%
widgets runtime global-presales cumulocity datapoints map cumulocity-iot iot-analytics cumulocity-widget widget

cumulocity-data-points-map-widget's Introduction

Data Points Map Widget for Cumulocity

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⚠️

Please choose Data Points Map release based on Cumulocity/Application builder version:

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

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 use application builder to install your runtime widget.

Installation of widget through Appbuilder?

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.

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

  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
    
    
    

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 v14.18.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.

cumulocity-data-points-map-widget's People

Contributors

artikhare avatar darpanlalani avatar sandhyadeeps avatar techcommunity avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.