2.9.0 • Published 4 years ago

@boldadmin/angular-google-maps v2.9.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

angular-google-maps

This library integrates Google Maps functionality to Angular framework.

Installation

Install using node package manager:

$ npm install @boldadmin/angular-google-maps

Usage

Add new provider just like in the sample to @NgModule annotation of app.module.ts file and replace YOUR_GOOGLE_MAPS_API_KEY with google maps api key:

@NgModule({
        providers: [
        {
            provide: APP_INITIALIZER,
            useFactory: () => (() => GoogleMapsLoader.load('YOUR_GOOGLE_MAPS_API_KEY')),
            deps: [GoogleMapsLoader],
            multi: true
        }
    ]
})

Add new import just like in the sample to @NgModule annotation of module where you will be using angular-google-maps:

@NgModule({
    imports: [
        AngularGoogleMapsModule
    ]
})

Add the following element <google-maps></google-maps> to your html template where map will be displayed.

Add AngularGoogleMapsComponent reference inside your component:

@ViewChild(AngularGoogleMapsComponent) mapsComponent: AngularGoogleMapsComponent

Create map by providing focusLocation which will display the location from given coordinates and markerLocation which will place marker at the given coordinates:

this.mapsComponent.setUpMapByLocation(focusLocation, markerLocation)

Create map by providing only focusLocation and no markerLocation in order not to display marker:

this.mapsComponent.setUpMapByLocation(focusLocation, [])

Create map by providing address which will display the location after geocoding the input:

this.mapsComponent.setUpMapByAddress(address)

License

MIT

2.9.0

4 years ago

2.9.0-dev

4 years ago

2.8.0-dev

4 years ago

2.8.0

4 years ago

2.7.1

4 years ago

2.7.1-dev

4 years ago

2.7.0

4 years ago

2.7.0-dev

4 years ago

2.6.2

5 years ago

2.6.2-dev

5 years ago

2.6.1

5 years ago

2.6.1-dev

5 years ago

2.6.0-dev

5 years ago

2.5.1

5 years ago

2.5.1-dev

5 years ago

2.5.0

5 years ago

2.5.0-dev

5 years ago

2.4.0

5 years ago

2.4.0-dev

5 years ago

2.3.1

5 years ago

2.3.1-dev

5 years ago

2.3.0

5 years ago

2.3.0-dev

5 years ago

2.2.4

5 years ago

2.2.4-dev

5 years ago

2.2.3

5 years ago

2.2.3-dev

5 years ago

2.2.2-dev

5 years ago

2.2.2

5 years ago

2.2.1

5 years ago

2.2.1-dev

5 years ago

2.2.0

5 years ago

2.2.0-dev

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.0

5 years ago