@a7gm/js-marker-clusterer 中文文档教程
Marker Clusterer for AGM
这个包利用 js-marker-clusterer 添加集群支持 年度股东大会。
Installation
@a7gm/js-marker-clusterer 在 js-marker-clusterer 上有一个对等依赖
npm install js-marker-clusterer @a7gm/js-marker-clusterer --save
# or
yarn add js-marker-clusterer @a7gm/js-marker-clusterer
Usage
导入模块
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; // add these imports import { AgmCoreModule } from '@a7gm/core'; import { AgmJsMarkerClustererModule } from '@a7gm/js-marker-clusterer'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, AgmCoreModule.forRoot({ apiKey: ['YOUR_API_KEY_HERE'] }), AgmJsMarkerClustererModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
使用它你的模板
<agm-map style="height: 300px" [latitude]="51.673858" [longitude]="7.815982"> <agm-marker-cluster imagePath="https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m"> <agm-marker [latitude]="51.673858" [longitude]="7.815982"> </agm-marker><!-- multiple markers --> </agm-marker-cluster> </agm-map>
Marker Clusterer for AGM
this package levereges the js-marker-clusterer to add clustering support to AGM.
Installation
@a7gm/js-marker-clusterer has a peer depedency on js-marker-clusterer
npm install js-marker-clusterer @a7gm/js-marker-clusterer --save
# or
yarn add js-marker-clusterer @a7gm/js-marker-clusterer
Usage
Import the module
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; // add these imports import { AgmCoreModule } from '@a7gm/core'; import { AgmJsMarkerClustererModule } from '@a7gm/js-marker-clusterer'; @NgModule({ declarations: [ AppComponent ], imports: [ BrowserModule, AgmCoreModule.forRoot({ apiKey: ['YOUR_API_KEY_HERE'] }), AgmJsMarkerClustererModule ], providers: [], bootstrap: [AppComponent] }) export class AppModule { }
use it in your template
<agm-map style="height: 300px" [latitude]="51.673858" [longitude]="7.815982"> <agm-marker-cluster imagePath="https://raw.githubusercontent.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m"> <agm-marker [latitude]="51.673858" [longitude]="7.815982"> </agm-marker><!-- multiple markers --> </agm-marker-cluster> </agm-map>
更多
你可能也喜欢
- 6ec0bd7f 中文文档教程
- @-asap-/hello-world 中文文档教程
- @11tyrocks/eleventy-plugin-social-images 中文文档教程
- @39digits/eslint-config-react 中文文档教程
- @abcfe/webpack-manifest 中文文档教程
- @abhijithvijayan/tsconfig 中文文档教程
- @abridged/web-wallet-client-sdk 中文文档教程
- @abtnode/blocklet-services 中文文档教程
- @accateo/hex2bin 中文文档教程
- @acoustic-content-sdk/react-logger 中文文档教程