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 🙏

© 2025 – Pkg Stats / Ryan Hefner

gd-cesium-sdk

v0.1.52

Published

基于开源项目 Cesium 进行二次封装的 WebGIS 应用框架

Readme

GD-Cesium-SDK

🇨🇳 中文

GD-Cesium-SDK 是基于开源项目 Cesium 进行二次封装的二三维一体的 WebGIS 应用框架,该框架优化了部分 Cesium 的使用方式和增添一些通用功能,旨在为开发者快速构建 WebGIS 应用。

Tips:本框架是 TypeScript+GIS+Vue3 的框架包。开发者需要有一定的前端技术和 GIS 相关技术

安装

NPM / YARN (推荐使用)

yarn add gd-cesium-sdk
-------------------------
npm install gd-cesium-sdk

// vite-plugin-cesium 插件
yarn add cesium vite-plugin-cesium vite -D
-------------------------
npm i cesium vite-plugin-cesium vite -D

使用

vite 配置

vite.config.ts

import { defineConfig } from 'vite'
import cesium from 'vite-plugin-cesium'
export default defineConfig({
  plugins: [cesium()]
})

全局导入

import 'gd-cesium-sdk/style/style.css'
import * as GDSDK from 'gd-cesium-sdk'
GDSDK.Cesium.Ion.defaultAccessToken =
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmZTA1MDQ2NC0wZmYwLTRhZWMtYWY4OC1jY2JkMDU1NjVmOGMiLCJpZCI6NDM0MzQsImlhdCI6MTY0OTkzNjc0Mn0.nafX1X_3586auU738TC3DxvsiSvPxnQ3TmamqUkb8kw'
// 通过TypeScript加载地图
const viewer = new GDSDK.Viewer('viewer-container', {
  showCreditContainer: false
})
// 倾斜摄影
const layer = new GDSDK.TilesetLayer({
  url: GDSDK.Cesium.IonResource.fromAssetId(1633341),
  type: '3dtiles'
}).addTo(viewer)
layer.setHeight(60)
// 高德底图
new GDSDK.AmapImageryLayer().addTo(viewer)
viewer.delegate.flyTo(layer.delegate)

分模块导入

import 'gd-cesium-sdk/style/style.css'
import { Viewer, OverlayUtil, HtmlLayer, AmapImageryLayer } from'cesium-map-sdk'
Cesium.Ion.defaultAccessToken =
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmZTA1MDQ2NC0wZmYwLTRhZWMtYWY4OC1jY2JkMDU1NjVmOGMiLCJpZCI6NDM0MzQsImlhdCI6MTY0OTkzNjc0Mn0.nafX1X_3586auU738TC3DxvsiSvPxnQ3TmamqUkb8kw'
// 加载地图
const viewer = new Viewer('viewer-container', {
  showCreditContainer: false
})
// 倾斜摄影
const layer = new TilesetLayer({
  url: Cesium.IonResource.fromAssetId(1633341),
  type: '3dtiles'
}).addTo(viewer)
layer.setHeight(60)
// 高德底图
new AmapImageryLayer().addTo(viewer)
viewer.delegate.flyTo(layer.delegate)

Vue组件

<template>
  <div id="app">
    <ViewerComponent @onViewCreated="onViewCreated">
    <BasemapComponent />
    <NavigationComponent />
    <HawkeyemapComponent />
    <PositionComponent />
  </ViewerComponent>
  </div>
</template>

<script lang="ts" setup>
import 'gd-cesium-sdk/style/style.css'
import {
  ViewerComponent,
  BasemapComponent,
  NavigationComponent,
  HawkeyemapComponent,
  PositionComponent,
  TilesetLayer,
  Cesium
} from 'gd-cesium-sdk'
import type { Viewer } from 'gd-cesium-sdk'

Cesium.Ion.defaultAccessToken =
  'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJmZTA1MDQ2NC0wZmYwLTRhZWMtYWY4OC1jY2JkMDU1NjVmOGMiLCJpZCI6NDM0MzQsImlhdCI6MTY0OTkzNjc0Mn0.nafX1X_3586auU738TC3DxvsiSvPxnQ3TmamqUkb8kw'
const onViewCreated = (viewer: Viewer) => {
  viewer.showLoadingMask(true)
  const duration = 1
  const layer = new TilesetLayer({
    url: Cesium.IonResource.fromAssetId(1633341),
    type: '3dtiles'
  }).addTo(viewer)
  layer.setHeight(60)
  viewer.delegate.flyTo(layer.delegate)
  setTimeout(() => {
    viewer.showLoadingMask(false)
  }, duration)
}
</script>