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 🙏

© 2026 – Pkg Stats / Ryan Hefner

gpx-viewer-vue

v0.0.6

Published

A Vue 3 component library for viewing GPX files with map visualization, elevation charts, and statistics

Readme

GpxViewer Vue Component Library

一个基于 Vue 3 的 GPX 文件查看器组件库,支持在地图上显示 GPX 轨迹数据、高程图表和统计信息。

✨ 特性

  • 🗺️ 基于高德地图的轨迹展示
  • 📊 高程图表可视化
  • 📈 详细的运动统计信息
  • 🎯 支持拖拽上传 GPX 文件
  • 🎨 使用原生 CSS 构建的现代化 UI
  • 📦 纯组件库,无路由依赖,无 UnoCSS 依赖
  • 🔧 TypeScript 支持

📦 安装

打包组件库

pnpm build:lib

打包后的文件会输出到 dist 目录。

在新项目中使用

pnpm add vue@^3.0.0 @amap/amap-jsapi-loader@^1.0.1 echarts@^6.0.0 fast-xml-parser@^5.3.3

🚀 快速开始

使用组件

<template>
  <div style="width: 100%; height: 100vh;">
    <GpxViewer :map-key="'your-amap-key'" />
  </div>
</template>

<script setup lang="ts">
import { GpxViewer } from './libs/gpx-viewer/gpx-viewer.es.js'
import './libs/gpx-viewer/gpx-viewer.css'
</script>

📚 文档

🛠️ 开发

# 安装依赖
pnpm install

# 开发模式
pnpm dev

# 打包组件库
pnpm build:lib

# 类型检查
pnpm typecheck

# 代码检查
pnpm lint

📝 导出内容

组件

  • GpxViewer - 主组件
  • GEcharts - 高程图表组件
  • GSummar - 统计信息组件

Hooks

  • useFileDrop - 文件拖拽 Hook
  • useMap - 地图 Hook

工具函数

  • parseGPX - 解析 GPX XML 字符串
  • parseGPXFile - 解析 GPX 文件
  • calculateGPXStatistics - 计算统计信息
  • convertGPXToMapPath - 转换为地图路径
  • calculatePathBounds - 计算路径边界
  • extractElevationData - 提取高程数据

类型

  • GPXData
  • GPXPoint
  • GPXWaypoint
  • GPXRoute
  • GPXTrack
  • GPXStatistics
  • 等等...

📄 License

MIT