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

adsbmap-data-providor

v1.0.8

Published

基于vue的adsb socket数据提供库。

Downloads

7

Readme

adsbmap-data-providor

基于Vue的 adsb socket 数据提供库。

Guide

Quick Start

Installation

npm install --save adsbmap-data-providor

DataProvidor

引入

先在组件中引入该组件。

import { DataProvidor } from "adsbmap-data-providor";

使用

<template>
  <DataProvidor
    socketUrl="http://xxx.xxx.xxx/socketUrl"
    uuid="xxx"
    tokenUrl="http://xxx.xxx/tokenUrl"
  ></DataProvidor>
</template>

API

DataProvidor

DataProvidor 包装了连接 socket,验证 socket 的相关逻辑。

Props 可传参数

Provide 依赖注入

$onValidatedSocket: Promise<T>

$onValidatedSocket 表示 socket 已经连接成功并且已经通过了 token 验证。返回了一个 Promise 对象,在 resolve 中返回了 LocSocket 实例。

Methods 方法

fetchFlightPath

用来获取航班的轨迹。详情可参考 socket.getFlightFullPath()

Events 事件

@connect

socket 连接成功回调事件。

@load

socket 已经连接并且验证成功

@push-locflight

socket 推送范围内航班的回调事件。

@push-forecasttrace

socket 推送航班轨迹的回调事件。

@disconnect

socket 连接失败回调事件。

@heart-beat

socket 心跳消息回调事件。

LocSocket

Socket 的类,封装了 socket 相关的连接,验证,推送数据,获取数据等方法。

Methods 方法

heartBeat

发送心跳消息,保持 socket 连接

subscribeLocFlight

订阅范围内的轨迹数据推送。

pauseSubscribeLocFlight

暂停订阅范围轨迹数据推送

getFlightFullPath

获取航班的轨迹数据。

close

主动关闭 socket。