JSPM

  • Created
  • Published
  • Downloads 813
  • Score
    100M100P100Q115548F
  • License MIT

Angular components for Yandex.Maps

Package Exports

  • angular8-yandex-maps

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (angular8-yandex-maps) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

npm GitHub Workflow Status (branch) codecov npm npm bundle size GitHub Repo stars

Angular8-yandex-maps

Angular components for Yandex.Maps.

Documentation

Documentation

See repository branches for older versions.

Examples

Examples

Installation

npm install angular8-yandex-maps

Version compatibility

Angular version Library Version
v9, v10, v11, v12 v12.x
v8 v8.x
v7 v7.x
v6 v6.x
npm install angular8-yandex-maps@^6.0.0

Usage

app.module.ts

Default map config options
import { AngularYandexMapsModule } from 'angular8-yandex-maps';

@NgModule({
  imports: [AngularYandexMapsModule],
})
export class AppModule {}
Own map config options
import { AngularYandexMapsModule, YaConfig } from 'angular8-yandex-maps';

const mapConfig: YaConfig = {
  apikey: 'API_KEY',
  lang: 'en_US',
};

@NgModule({
  imports: [AngularYandexMapsModule.forRoot(mapConfig)],
})
export class AppModule {}
Injection token
import { AngularYandexMapsModule, YA_CONFIG } from 'angular8-yandex-maps';

@NgModule({
  imports: [AngularYandexMapsModule],
  providers: [
    {
      provide: YA_CONFIG,
      useValue: {
        apikey: 'API_KEY',
        lang: 'en_US',
      },
    },
  ],
})
export class AppModule {}

component.html

<div class="container">
  <ya-map [center]="[55.751952, 37.600739]" [zoom]="12">
    <ya-placemark [geometry]="[55.751952, 37.600739]"></ya-placemark>
  </ya-map>
</div>

component.css

.container {
  width: 1000px;
  height: 500px;
}

Changelog

CHANGELOG

License

MIT