Angular Google Maps (AGM) extension for markerwithlabel support
npm install @ajqua/marker-with-label-----
this package levereges the [markerwithlabel][markerwithlabel] to add possibility to change marker's label style with css class in [AGM][agm].
@ajqua/marker-with-label has a peer depedency on [markerwithlabel npm package][markerwithlabel npm package]
``shell`
npm install markerwithlabel @ajqua/marker-with-label --saveor
yarn add markerwithlabel @ajqua/marker-with-label
1. Import the module
`typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
// add these imports
import { AgmCoreModule } from '@ajqua/core';
import { AgmMarkerWithLabelModule } from '@ajqua/marker-with-label';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
AgmCoreModule.forRoot({
apiKey: ['YOUR_API_KEY_HERE']
}),
AgmMarkerWithLabelModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
`
2. use it in your template
`html``
[labelInBackground]="true" [labelAnchor]="{x: 30, y: -9}">
[markerwithlabel]: https://github.com/googlemaps/v3-utility-library/tree/master/markerwithlabel
[markerwithlabel npm package]:https://www.npmjs.com/package/markerwithlabel
[agm]: https://angular-maps.com/