Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leftstick/angular2-baidu-map
Angular2 component for Baidu map
https://github.com/leftstick/angular2-baidu-map
Last synced: about 1 month ago
JSON representation
Angular2 component for Baidu map
- Host: GitHub
- URL: https://github.com/leftstick/angular2-baidu-map
- Owner: leftstick
- License: gpl-3.0
- Created: 2016-03-03T06:35:10.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T01:54:42.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T14:36:12.690Z (about 1 month ago)
- Language: TypeScript
- Homepage: https://leftstick.github.io/angular2-baidu-map
- Size: 9.91 MB
- Stars: 138
- Watchers: 8
- Forks: 53
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-angular - angular2-baidu-map - Angular2 component for Baidu map. (Uncategorized / Uncategorized)
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: MapOptionsconstructor() {
this.options = {
centerAndZoom: {
lat: 39.920116,
lng: 116.403703,
zoom: 16
},
enableKeyboard: true
}
}
}
```**app.component.html**
```html
```
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