Skip to content
A module of MagicMirror² to geo-track a moving object on the map. This continuously listens to a pubnub channel where the publisher (example file attached) has to publish the new location (lat, lon) as and when moves.
JavaScript HTML CSS
Branch: master
Clone or download
Latest commit cc35a2d Apr 26, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Capture.JPG Add files via upload Apr 26, 2018
LICENSE Initial commit Apr 26, 2018
MMM-GeoTracking.css Add files via upload Apr 26, 2018
MMM-GeoTracking.js Add files via upload Apr 26, 2018
README.md Update README.md Apr 26, 2018
geotracking_publisher_example.html Add files via upload Apr 26, 2018
package.json Add files via upload Apr 26, 2018

README.md

MMM-GeoTracking

A module of MagicMirror² to live track a moving object on the map. This continuously listens to a pubnub channel where the publisher (example file attached) has to publish the new location (lat,lon) as and when moves.

picture

Using the module

  • Navigate to the modules directory via the follow command: cd MagicMirror/modules
  • Clone the module from github: git clone https://github.com/asimhsidd/MMM-GeoTracking.git
  • Navigate to the MMM-GeoTracking directory: cd MMM-GeoTracking
  • Install the dependencies: npm install
  • Add the following configuration to the modules array in the config/config.js file:
    modules: [
        {
			module: 'MMM-GeoTracking',
			position: 'top_right',
			config: {
				pnchannel: "MMM-GeoTracking", // change it to anything, like 'Car-Tracker'
				gmapid: "", // Input your google key here (btw, its free :p)
				pnids: "", // Input your pubnub subscriber key (btw, its free too :p)
				lat: "25.2048", // default latitude (its somewhere my office)
				lng: "55.2708", // default longitude
				label: "AS" // Anything you may like
			}
        }
    ]

Configuration options for MMM-GeoTracking

Option Description
position Required The position of the screencast window.
Options: ['bottomRight', 'bottomCenter', 'bottomLeft', 'center', 'topRight', 'topCenter', 'topLeft']
Type: string
Note: This module config actual sets the location, not the magic mirror position config.
pnchannel Required Pubnub channel name.
gmapid Required Your google key.
pnids Required Subscriber key of your pubnub account.
lat Optional Latitude of the default location.
lng Optional Longitude of the default location.
label Optional Marker label.
You can’t perform that action at this time.