# angular2-baidu-map

> [![NPM version][npm-image]][npm-url] ![][david-url] ![][dt-url] ![][license-url]

Latest version **8.1.1** (published 2020-11-02) · 0 weekly downloads

## Install

```sh
npm install angular2-baidu-map
pnpm add angular2-baidu-map
yarn add angular2-baidu-map
bun add angular2-baidu-map
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 8.1.1 |
| Published | 2020-11-02 |
| First published | 2016-03-09 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 1021.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | howard.zuo |

## Links

- npm: https://www.npmjs.com/package/angular2-baidu-map
- npm.io page: https://npm.io/package/angular2-baidu-map

## Dependencies (1)

- [tslib](https://npm.io/package/tslib.md) ^1.9.0

## Recent versions

- 8.1.1 (latest) — 2020-11-02
- 8.0.0 — 2019-11-02
- 4.7.1 — 2019-10-31
- 4.7.0 — 2019-06-21
- 4.6.1 — 2019-04-15
- 4.6.0 — 2019-02-09
- 4.5.0 — 2018-10-02
- 4.4.0 — 2018-09-26
- 4.3.3 — 2018-09-20
- 4.3.2 — 2018-06-21
- 4.3.0 — 2018-05-20
- 4.2.1 — 2018-04-13
- 4.2.0 — 2018-04-04
- 4.1.2 — 2018-04-01
- 4.1.1 — 2018-03-03
- … 20 more at https://npm.io/package/angular2-baidu-map/versions

## README

# angular2-baidu-map

[![NPM version][npm-image]][npm-url]
![][david-url]
![][dt-url]
![][license-url]

Baidu-Map module for Angular8

Read full documentation here: [documentation](https://leftstick.github.io/angular2-baidu-map/)

Read code example here: [example](https://github.com/leftstick/angular8-baidu-map-example)

> Be aware that it is a totally rewrite version, therefore, backward compatibility is not considered

* If you are using the previous version `3.x`, [read it here](https://github.com/leftstick/angular2-baidu-map/tree/3.x)
* If you are using the previous version `4.x`, [read it here](https://github.com/leftstick/angular2-baidu-map/tree/4.x)

## Getting started

```bash
npm install angular2-baidu-map
```

## Usage

**app.module.ts**

```typescript
import { BrowserModule } from '@angular/platform-browser'
import { NgModule } from '@angular/core'

import { AppComponent } from './app.component'

import { BaiduMapModule } from 'angular2-baidu-map'

@NgModule({
  declarations: [AppComponent],
  imports: [BrowserModule, BaiduMapModule.forRoot({ ak: 'your ak' })],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule {}
```

**app.component.ts**

```typescript
import { Component } from '@angular/core'

import { MapOptions } from 'angular2-baidu-map'

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: []
})
export class AppComponent {
  options: MapOptions

  constructor() {
    this.options = {
      centerAndZoom: {
        lat: 39.920116,
        lng: 116.403703,
        zoom: 16
      },
      enableKeyboard: true
    }
  }
}
```

**app.component.html**

```html
<baidu-map [options]="options" style="display: block; width: 550px; height: 350px;"></baidu-map>
```

For more information, see [documentation](http://leftstick.github.io/angular2-baidu-map/)

## LICENSE

[GPL License](https://raw.githubusercontent.com/leftstick/angular2-baidu-map/master/LICENSE)

[npm-url]: https://npmjs.org/package/angular2-baidu-map
[npm-image]: https://img.shields.io/npm/v/angular2-baidu-map.svg
[david-url]: https://david-dm.org/leftstick/angular2-baidu-map.png
[dt-url]: https://img.shields.io/npm/dt/angular2-baidu-map.svg
[license-url]: https://img.shields.io/npm/l/angular2-baidu-map.svg

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