GithubHelp home page GithubHelp logo

softwareag / cumulocity-tracking-replay-map-widget Goto Github PK

View Code? Open in Web Editor NEW
1.0 4.0 1.0 3.89 MB

The Tracking Replay Map widget help you to track and replay device location on map. Runtime installation is available. Created by Global Presales.

License: Apache License 2.0

JavaScript 1.32% TypeScript 97.10% HTML 1.17% Less 0.21% CSS 0.20%
cumulocity-iot iot-analytics runtime widgets cockpit global-presales widget cumulocity-widget

cumulocity-tracking-replay-map-widget's Introduction

Cumulocity Tracking Replay Widget

⚠️ This project is no longer under development. Please use cumulocity-tracking-replay-map-widget-plugin for Application Builder >=2.x.x and Cumulocity >=1016.x.x⚠️

The Cumulocity Tracking Replay widget help you to displays track lines of the tracking device with replay feature on map.

tracking replay image

Features

  • Tracking Events: Displays the position in map at a particular time.

  • Faster/ Slower: Configurable speed for tracing the path movement.

  • Date/Time Filter: Filters tracking events based on the date/time selected.

  • Marker Click: Shows the longitude and latitude of the marker.

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

  • Configurable Device: Based on configuration during widget configuration a device can be selected.

  • Configurable Event And Fragment Type: Based on configuration during widget configuration, events can be filtered to get only the desired type of event.

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 or Cockipt Deployment?

Supported Cumulocity Environments:

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

  • Cockpit Application: Tested with Cockpit 1009.0.4 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"

"leaflet2": "npm:[email protected]"

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 Replay Tracking Map Latest Release Binary.

  3. Install the Binary file in app builder.

    
    npm i <binary file path>/gp-tracking-replay-map-x.x.x.tgz
    
    
  4. Import GpTrackingReplayMapModule in custom-widget.module.ts file located at /cumulocity-app-builder/custom-widgets/

    
    import {GpTrackingReplayMapModule} from  'gp-tracking-replay-map';
    
    @NgModule({
    
    imports: [
    
    GpTrackingReplayMapModule
    
    ]
    
    })
    
    
  5. 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 [email protected] leaflet2@npm:leaflet@^1.6.0
    
    
  2. Grab the Tracking Replay Map Latest Release Binary

  3. Install the Binary file in your project.

    npm i <binary file path>/gp-tracking-replay-map-x.x.x.tgz
    
  4. Import GpTrackingReplayMapModule in app.module.ts file located at /cumulocity-app/

    
    import {GpTrackingReplayMapModule} from  'gp-tracking-replay-map';
    
    @NgModule({
    
    imports: [
    
    
    GpTrackingReplayMapModule
    
    
    ]
    
    })
    
    
    
  5. 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-tracking-replay-map-widget.git
    
    
  2. Change directory:

    
    cd cumulocity-tracking-replay-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 Tracking Replay Map

  5. Select Target Assets or Devices

  6. Click Save

Congratulations! Tracking Replay Map is configured.

User Guide

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

Tracking Replay Map On Screen Options:

  • Filters: The following filters can be used to filter/get data for the specified time period:

    • Start Date/Time
    • End Date/Time
    • Last minute
    • Last hour
    • Last day
    • Last week
    • Last month
  • Slower: Reduces the marker speed to half.

  • Play/ Pause: Marker traces the path when played and can be paused at any instance.

  • Faster: Increase the marker speed to double.

  • Reload: Useful for force reload/refresh map.

  • Zoom in/ out : Zooms in/out of the 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-tracking-replay-map-widget's People

Contributors

artikhare avatar darpanlalani avatar joshikaagrawal avatar sandhyadeeps avatar sheethaljr avatar techcommunity avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

cumulocity-tracking-replay-map-widget's Issues

Map Tiles are not loaded initially

In Application Builder I recognized that the map tiles are not loaded with the result of a grey bar in the map.
Only after resizing the window the map is completely reloaded and visualized.
Bildschirmfoto 2021-08-10 um 16 43 37
Bildschirmfoto 2021-08-10 um 18 16 24

Unable to install dependencies following instructions

Getting following error message during installation:

PS C:\Users\TBA\sourcecode\cumulocity-app-builder> npm i [email protected] leaflet2@npm:leaflet@^1.6.0       
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: @angular/[email protected]
npm ERR! node_modules/@angular/core
npm ERR!   @angular/core@"8.2.13" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"^7.1.0" from [email protected]
npm ERR! node_modules/angular-resize-event
npm ERR!   angular-resize-event@"1.1.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\TBA\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\TBA\AppData\Local\npm-cache\_logs\2021-06-28T06_58_20_864Z-debug.log

Is there actually a requirement for angular-resize-event? Can't we just listen for the changeEnd EventEmitter of the parent component (DashboardChildComponent)?

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.