ng-gol-map
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

NgGolMap

Install

Run npm i ng-gol-map

Usage

Import NgGolMap to your AppModule

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgGolMapModule.forRoot({
      apiKey: 'Your Google Maps API key'
    })
  ],
  providers: [],
  bootstrap: [AppComponent]
})

Define options for your map

this.mapOptions = {
  center: '',
  zoom: '',
  olmap: {
    ...
  },
  gmap: {
    ...
  }
}

Your template look like

<ng-gol-map [options]="mapOptions"></ng-gol-map>

Built-in

GolMap (component)

  • setGmapType, setCenter, setZoom
  • getView, getCenter, getZoom
  • onRendered, onClick

Service

  • findCurrentLocation, getCoordByAddress, getDefaultZoom, getDefaultCnter

Utilities

  • createVectorLayer, createTileLayer, createRasterLayer

Readme

Keywords

none

Package Sidebar

Install

npm i ng-gol-map

Weekly Downloads

2

Version

0.1.4

License

none

Unpacked Size

350 kB

Total Files

29

Last publish

Collaborators

  • vixnguyen