angular2-baidu-map

Angular2 component for Baidu map

Github星跟蹤圖

angular2-baidu-map

NPM version


Baidu-Map module for Angular8

Read full documentation here: documentation

Read code example here: example

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

Getting started

npm install angular2-baidu-map

Usage

app.module.ts

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

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

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

For more information, see documentation

LICENSE

GPL License

主要指標

概覽
名稱與所有者leftstick/angular2-baidu-map
主編程語言TypeScript
編程語言TypeScript (語言數: 1)
平台
許可證GNU General Public License v3.0
所有者活动
創建於2016-03-03 14:35:10
推送於2023-01-06 09:54:42
最后一次提交2021-03-09 16:53:13
發布數30
最新版本名稱4.7.0 (發布於 )
第一版名稱1.0.0 (發布於 )
用户参与
星數137
關注者數7
派生數52
提交數160
已啟用問題?
問題數97
打開的問題數10
拉請求數9
打開的拉請求數21
關閉的拉請求數20
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?