Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ott_test/transit-vehicle-overlay

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ott_test/transit-vehicle-overlay

Realtime Transit Vehicles Component

  • 2.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

WHAT:

Presentational React Components used to build an interactive vehicle map (leaflet) overlay. This component uses functional components and hooks (no more class components).

NOTE: eventually want this component (and OTP-UI in general) to support both leaflet and mapbox gl libraries.

HOW:

There is a type format for RT vehicle data in OTP-UI: https://github.com/opentripplanner/otp-ui/blob/master/packages/core-utils/src/types.js#L54

This format was derived in this project to accord with a companion web service that delivers realtime vehicle information information, based on GTFS-Realtime data (https://github.com/OpenTransitTools/gtfsdb_realtime/blob/master/ott/gtfsdb_realtime/model/response/vehicle_list.py).

Other realtime vehicle data may be used with this layer. For example, there is demo code within the component that shows converting another service response format (https://developer.trimet.org/ws_docs/vehicle_locations_ws.shtml) to work with this layer.

NOTES:

  • The use of hooks was a good thing, but there's a bit of resulting redirection (HL functions, etc...) in the component lib (and interface) which obfuscates things a bit ... apologies in advance.
  • 2 very useful utilities for converting .svg to React svg .js files:

TODO:

  1. more / better unit tests
  2. mapbox gl

FAQs

Package last updated on 11 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc