# bmap-wind

> baidu map wind

Latest version **1.1.8** (published 2026-11-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install bmap-wind
pnpm add bmap-wind
yarn add bmap-wind
bun add bmap-wind
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1.1.8 |
| Published | 2026-11-19 |
| First published | 2020-02-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 212.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 714 |
| Author | sakitam-fdd |
| Maintainers | sakitam-fdd |
| Keywords | baidu map, 2d, webgl, map, vis, gis |

## Links

- npm: https://www.npmjs.com/package/bmap-wind
- Repository: https://github.com/sakitam-fdd/wind-layer
- Homepage: https://github.com/sakitam-fdd/wind-layer#readme
- Issues: https://github.com/sakitam-fdd/wind-layer/issues
- npm.io page: https://npm.io/package/bmap-wind

## Dependencies (1)

- [wind-core](https://npm.io/package/wind-core.md) 1.1.9

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.1.8 (latest) — 2026-11-19
- 1.1.7 — 2024-04-28
- 1.1.6 — 2024-04-14
- 1.1.5 — 2024-03-21
- 1.1.4 — 2024-03-17
- 1.1.3 — 2024-02-29
- 1.1.2 — 2022-11-26
- 1.1.1 — 2022-11-22
- 1.1.1-alpha.2 — 2021-04-09
- 1.1.1-alpha.1 — 2021-03-30
- 1.1.1-alpha.0 — 2021-03-26
- 1.1.0-alpha.0 — 2021-03-26
- 1.0.0-alpha.10 — 2020-07-05
- 1.0.0-alpha.9 — 2020-06-21
- 1.0.0-alpha.8 — 2020-06-21
- … 8 more at https://npm.io/package/bmap-wind/versions

## README

# `bmap-wind`

> [bmap](https://map.baidu.com) wind layer adapter

## Usage

### Install

```bash
pnpm i bmap-wind -D
```

### Example

```vue
<template>
  <div class="demo-content">
    <div class="map-warp" ref="map" id="bmap"></div>
  </div>
</template>
<script setup>
  import {ref, onMounted} from 'vue'

  const map = ref(null)

  const initMap = (dom) => {
  const map = new BMap.Map("bmap"); // eslint-disable-line
  map.centerAndZoom(new BMap.Point(116.3964, 39.9093), 2); // eslint-disable-line
  map.enableScrollWheelZoom();
  // 地图自定义样式
  map.setMapStyle({
  styleJson: [{
  "featureType": "water",
  "elementType": "all",
  "stylers": {
  "color": "#044161"
}
}, {
  "featureType": "land",
  "elementType": "all",
  "stylers": {
  "color": "#091934"
}
}, {
  "featureType": "boundary",
  "elementType": "geometry",
  "stylers": {
  "color": "#064f85"
}
}, {
  "featureType": "railway",
  "elementType": "all",
  "stylers": {
  "visibility": "off"
}
}, {
  "featureType": "highway",
  "elementType": "geometry",
  "stylers": {
  "color": "#004981"
}
}, {
  "featureType": "highway",
  "elementType": "geometry.fill",
  "stylers": {
  "color": "#005b96",
  "lightness": 1
}
}, {
  "featureType": "highway",
  "elementType": "labels",
  "stylers": {
  "visibility": "on"
}
}, {
  "featureType": "arterial",
  "elementType": "geometry",
  "stylers": {
  "color": "#004981",
  "lightness": -39
}
}, {
  "featureType": "arterial",
  "elementType": "geometry.fill",
  "stylers": {
  "color": "#00508b"
}
}, {
  "featureType": "poi",
  "elementType": "all",
  "stylers": {
  "visibility": "off"
}
}, {
  "featureType": "green",
  "elementType": "all",
  "stylers": {
  "color": "#056197",
  "visibility": "off"
}
}, {
  "featureType": "subway",
  "elementType": "all",
  "stylers": {
  "visibility": "off"
}
}, {
  "featureType": "manmade",
  "elementType": "all",
  "stylers": {
  "visibility": "off"
}
}, {
  "featureType": "local",
  "elementType": "all",
  "stylers": {
  "visibility": "off"
}
}, {
  "featureType": "arterial",
  "elementType": "labels",
  "stylers": {
  "visibility": "off"
}
}, {
  "featureType": "boundary",
  "elementType": "geometry.fill",
  "stylers": {
  "color": "#029fd4"
}
}, {
  "featureType": "building",
  "elementType": "all",
  "stylers": {
  "color": "#1a5787"
}
}, {
  "featureType": "label",
  "elementType": "all",
  "stylers": {
  "visibility": "off"
}
}, {
  "featureType": "poi",
  "elementType": "labels.text.fill",
  "stylers": {
  "color": "#ffffff"
}
}, {
  "featureType": "poi",
  "elementType": "labels.text.stroke",
  "stylers": {
  "color": "#1e1c1c"
}
}, {
  "featureType": "administrative",
  "elementType": "labels",
  "stylers": {
  "visibility": "off"
}
}, {
  "featureType": "road",
  "elementType": "labels",
  "stylers": {
  "visibility": "off"
}
}]
});

  // const { WindLayer } = require('bmap-wind');

  import('bmap-wind').then(({WindLayer}) => {
  fetch('https://sakitam.oss-cn-beijing.aliyuncs.com/codepen/wind-layer/json/wind.json')
  .then(res => res.json())
  .then(res => {
  const windLayer = new WindLayer(res, {
  windOptions: {
  // colorScale: scale,
  velocityScale: 1 / 20,
  paths: 5000,
  // eslint-disable-next-line no-unused-vars
  colorScale: [
  "rgb(36,104, 180)",
  "rgb(60,157, 194)",
  "rgb(128,205,193 )",
  "rgb(151,218,168 )",
  "rgb(198,231,181)",
  "rgb(238,247,217)",
  "rgb(255,238,159)",
  "rgb(252,217,125)",
  "rgb(255,182,100)",
  "rgb(252,150,75)",
  "rgb(250,112,52)",
  "rgb(245,64,32)",
  "rgb(237,45,28)",
  "rgb(220,24,32)",
  "rgb(180,0,35)"
  ],
  lineWidth: 2,
  // colorScale: scale,
  generateParticleOption: false
},
  zIndex: 20,
  // map: map,
  // projection: 'EPSG:4326'
});

  console.log(map, windLayer);

  map.addOverlay(windLayer);
});
});
}

  onMounted(() => {
  initMap(map.value);
});
</script>

<style lang="less">
  .demo-content {
  width: 100%;
  height: 100vh;
  position: relative;
  background-color: #cbe0ff;

  &-datgui {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  pointer-events: auto;
}

  .map-warp {
  width: 100%;
  height: 100%;
}
}
</style>

```

---
_Source: https://npm.io/package/bmap-wind · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
