@ajqua/marker-with-label
v1.0.0-beta.4d
Published
Angular Google Maps (AGM) extension for markerwithlabel support
Maintainers
Readme
Marker with label for AGM
this package levereges the markerwithlabel to add possibility to change marker's label style with css class in AGM.
Installation
@ajqua/marker-with-label has a peer depedency on markerwithlabel npm package
npm install markerwithlabel @ajqua/marker-with-label --save
# or
yarn add markerwithlabel @ajqua/marker-with-labelUsage
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 '@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 { }use it in your template
<agm-map style="height: 300px" [latitude]="51.673858" [longitude]="7.815982"> <agm-marker-with-label [latitude]="32.085299899999995" [longitude]="34.781767599999995" labelContent="Label marker" labelClass="marker-label-class" [labelInBackground]="true" [labelAnchor]="{x: 30, y: -9}"></agm-marker-with-label> </agm-map>
