npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

material-ui-gps-player

v1.1.4

Published

GPS coordinates player designed with material ui

Downloads

36

Readme



This react component is fully developed using React Material UI framework to show GPS paths. You can play, pause and stop while playing GPS coordinates with this component.

material-ui-gps-player Preview

Installation

npm install @material-ui/core @material-ui/icons react react-dom material-ui-gps-player --save

Usage

import Player from 'material-ui-gps-player';


class App extends Component {


  render() {
    return (
      <div>
        <Player
          apiKey="Your Key"
          language="en"
          zoom={14}
          coordinates={data}
        />
      </div>
    );
  }
}

Props

| Props (* required) | Defualt | Description | Type | |--- |--- |--- | --- | |apiKey * | undefined | API key for google maps | string | |coordinates* | [] | GPS Coordinates that containing lat:float,lng:float,time:int,bearing?:float properties. lat,lng,time properties are required. time property is expecting a UNIX timestamp and all other properties (lat,lng,bearing) expecting floats. bearing is optional. We are calculating bearing using nearest coordinates if you didn't supply. Pass boolean value to marker if you want to display a marker. All other properties taking as marker's props if marker is true. | array | | | | time:int is passing to all below callbacks as the first parameter.|| |onChangeTime | undefined | When time has changed in the player. | function | |onChangeSpeed| undefined | When player speed is changed. | function | | onPlay | undefined | This function will trigger when play button is clicked. | function | | onPause | undefined | When click the pause icon | function | | onPause | undefined | When click the stop icon | function | | currentTime | undefined | Currently playing time in UNIX format | number | | speeds | [-200, -100, 50, 100, 200, 500, 750, 1000] | Available speeds for the player. Current speed is choosing from these values when click on the forward button. | number[] | | speed | internal states | Currently playing speed. We are using our internal state if you didn't supplied a speed. | number | | timeFormat | HH:mm:ss | Time format to display start/end times. Please supply a time format supported in moment. | string | | iconMarker | {scale: 6,fillColor: blue[600],fillOpacity: 1,strokeWeight: 0}| google marker icon decorations. | object | | width | undefined | Width for the player wrapper. | number | | height | 500 | Height of the player wrapper. | number | | center | {lat: 7.8731,lng: 80.7718} | This is the center of map when initializing. center parameter required a object that contains lat, lng properties. | object | | polyLine | undefined | Poly Line properties. Ex:- {strokeWidth:4, strokeColor: '#fff'} | object | | speedMultiplier | 25 | Speed multiplier when switching between waiting time enabled and disabled. | number |

Testing

Install depedencies

npm install

Start the testing app

npm start

Contribution

All PR s and issues are welcome!