All Projects ā†’ arg0navt ā†’ leaflet-react-track-player

arg0navt / leaflet-react-track-player

Licence: other
This is plugin for react-leaflet. It create player for control of track. šŸƒšŸŒŽāš”

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to leaflet-react-track-player

gatsby-starter-leaflet
šŸƒ A Gatsby starter with Leafet to quickly build React apps with a map!
Stars: āœ­ 108 (+414.29%)
Mutual labels:  react-leaflet, leaflet
dash leaflet
Leaflet component for dash. Illustration of error encountered during python build.
Stars: āœ­ 21 (+0%)
Mutual labels:  react-leaflet, leaflet
react-esri-leaflet
react components for esri-leaflet
Stars: āœ­ 24 (+14.29%)
Mutual labels:  react-leaflet, leaflet
coronavirus-map-dashboard
šŸ¦  Coronavirus (COVID-19) Map Dashboard using coronavirus-tracker-api
Stars: āœ­ 41 (+95.24%)
Mutual labels:  react-leaflet, leaflet
georaster-layer-for-leaflet
Display GeoTIFFs and soon other types of raster on your Leaflet Map
Stars: āœ­ 168 (+700%)
Mutual labels:  leaflet
go-go-map
ē™¾åŗ¦åœ°å›¾ē“¦ē‰‡äø‹č½½å·„具 ē¦»ēŗæ地图ē”Ÿęˆ
Stars: āœ­ 27 (+28.57%)
Mutual labels:  leaflet
CBPlayer
äø€äøŖ内ē½®P2Pēš„ē„žå„‡ę’­ę”¾å™Ø
Stars: āœ­ 60 (+185.71%)
Mutual labels:  player
mpc-qt
Media Player Classic Qute Theater
Stars: āœ­ 125 (+495.24%)
Mutual labels:  player
swap
A Solver for the Wavelength Assignment Problem (RWA) in WDM networks
Stars: āœ­ 27 (+28.57%)
Mutual labels:  leaflet
vaguely-rude-places
The map of Vaguely Rude Place Names
Stars: āœ­ 19 (-9.52%)
Mutual labels:  leaflet
simple-cloud-music
ē®€ę“ēš„ēš„ē¬¬äø‰ę–¹ē½‘ę˜“äŗ‘éŸ³ä¹ę’­ę”¾å™Ø
Stars: āœ­ 306 (+1357.14%)
Mutual labels:  player
protomaps.js
Lightweight vector map rendering, labeling and symbology for the web
Stars: āœ­ 359 (+1609.52%)
Mutual labels:  leaflet
deplayer
Decentralized mediaplayer which runs entirely in the browser.
Stars: āœ­ 14 (-33.33%)
Mutual labels:  player
leaflet-layer-tree-plugin
No description or website provided.
Stars: āœ­ 31 (+47.62%)
Mutual labels:  leaflet
StickMan-3D
StickMan 3D: First Round | indie fighting game | C++ OpenGL
Stars: āœ­ 60 (+185.71%)
Mutual labels:  player
angular-youtube-player
Simple youtube player created with angular and typescript. See demo.
Stars: āœ­ 35 (+66.67%)
Mutual labels:  player
VideoTimelineView
Video timeline UI for iOS Apps
Stars: āœ­ 103 (+390.48%)
Mutual labels:  player
aplay-
a simple BitPerfect player
Stars: āœ­ 23 (+9.52%)
Mutual labels:  player
Path.Drag.js
Add dragging capability to Leaflet paths.
Stars: āœ­ 21 (+0%)
Mutual labels:  leaflet
Rise-Media-Player
One media player for everything you own or stream; whether it's music or videos, online or offline Rise Media Player does it all. And it's beautiful and native with the latest version of WinUI.
Stars: āœ­ 600 (+2757.14%)
Mutual labels:  player

Leaflet-react-track-player

Build Status CircleCI GitHub repo size in bytes


This is package was created as a plugin for react-leaflet . It creates a player which animates along a polyline. It provides functions for pause, play and playback speed. The track colors may be customized.

Install

npm install leaflet-react-track-player
yarn add leaflet-react-track-player

import React, { Component } from "react";
import LeafletReactTrackPlayer from "leaflet-react-track-player";
import demo from "./demo";
import { Map, TileLayer } from "react-leaflet";

class App extends Component {
  state = {
    lat: 47.445745,
    lng: 40.272891666666666,
    zoom: 15,
    type: "distance",
    demo: demo
  };

  render() {
    const position = [demo[0].lat, demo[0].lng];
    return (
      <div className="App">
        <Map center={position} zoom={this.state.zoom}>
          <LeafletReactTrackPlayer
            track={this.state.demo}
            optionMultyIdxFn={function(p) {
              return p.status;
            }}
            optionsMulty={[
              { color: "#b1b1b1" },
              { color: "#06a9f5" },
              { color: "#202020" },
              { color: "#D10B41" },
              { color: "#78c800" }
            ]}
            progressFormat={this.state.type}
            customMarker={true}
            changeCourseCustomMarker={true}
            iconCustomMarker={"/img/mech.svg"}
          />
          <TileLayer
            attribution='&amp;copy <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
            url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
          />
        </Map>
      </div>
    );
  }
}

Params

Prop Type Default Description
track Array [] The points that define the polyline
optionMultyIdxFn Function () => {} Function to defined track segment colors
autoplay Boolean true Autoplay after init player or not
optionsMulty Array [] The colors used for track segments
customMarker Boolean false Should use a custom marker icon
iconCustomMarker String "" Path to your marker icon
customCourse Boolean false Need changing course of marker? You need have course in points. See demo
timeFormat String "YYMMDDHHmmss000" Time format is for mode "time". You need times stamps in points. See demo
styleMarker String "" Inline style for the marker
speedArray Array [] List of speeds
progressFormat String "default" Mode "default" uses the number of points as the value for progress. Mode "time" uses time stamps as the value for progress. Mode "distance" uses range in meters as the value for progress
useControl Bollean false Show or hide control panel
streamData Bollean false Update player after add new points
showDots Bollean false Show or hide points in progress line
defaultSpeed Number undefined Constant for speed (pixel/second)
callbackFinish Function () => {} Called after one full track run
callbackNext Function () => {} Called after next point in the polyline is reached
callbackPrev Function () => {} Called after previous point in the polyline is reached
callbackSpeed Function () => {} Called after changing spead
callbackFly Function () => {} Called after fly polyline
callbackStream Function () => {} Called after changing stream mode
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].