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

hpaas-sdk

v1.24.10

Published

欢迎来到 HPaaS SDK

Downloads

3

Readme

hpaas

欢迎来到 HPaaS SDK

安装

npm install hpaas-sdk --save

使用

import HPaaSDeckGL from "hpaas-sdk";
const mapConfig: IHpaasOptions = {
  mode: "grey",
  initPitch: 0,
  mapType: "mapbox",
  wmsBaseUrl: "/map/hpaas/wms",
  wfsBaseUrl: "/map/hpaas/wfs",
  show100meters: false,
  showBaseUnit: false,
  showBusinessUnit: false,
  businessUnitBaseUrl: "/app/business/unit/queryBusinessUnitListByGeography",
  center: [120, 90],
  zoom: 10,
};
const hpaas = new HPaaSDeckGL(mapConfig);

有关配置项的说明:{@link IHpaasOptions}

HPaaSDeckGL 中包含了 SDK 的 所有核心能力,其中包括:

  • baseUnit {@link IBaseUnit} 基础单元的实例,通常不会显示
  • businessUnit {@link BusinessUnit} 业务单元的实例,用来控制和渲染业务单元数据
  • renderCenter {@link RenderCenter} 渲染中心,负责渲染各种类型的图层,处理图层样式等
  • toolsCenter {@link ToolsCenter} 工具中心,负责绘制修改各种图形的工具实现
  • scene {@link IHPaaSScene} 画布中心,负责地图控制、图层管理、绑定事件等

通过以上大模块进入对应的功能

如需绑定全局事件,可通过 events 对象绑定,地图和图层事件通过 scene 对象来绑定

  • events {@link HpaasEventKeyMap} eventbus,从此处绑定部分全局事件

开发规范

  • 尽量不要使用 export default 导出对象或类
  • 注释尽量使用 block comment

Changelog

1.1.4

2021 年 10 月 11 日 16:09:08

  • 将 drawLayer 移入 businessUnit 对象

1.1.3

2021 年 10 月 11 日 11:24:12

  • 获取截图(格式 dataurl):const imageData = await map.scene.getImageDataUrl();
  • 地图默认不透明,使用 gif 加载(png 禁用不了透明),设置 wms 背景色