Socket
Socket
Sign inDemoInstall

angular-yandex-maps-v3

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

angular-yandex-maps-v3

Yandex.Maps Angular components that implement the Yandex.Maps JavaScript API 3.0


Version published
Weekly downloads
26
decreased by-70.79%
Maintainers
0
Weekly downloads
 
Created
Source

angular-yandex-maps-v3

Yandex.Maps Angular components that implement the Yandex.Maps JavaScript API 3.0

NPM version NPM downloads Codecov

📄 Documentation | 🗺️ Examples | ❓ FAQ

Installation

npm install angular-yandex-maps-v3
npm install @yandex/ymaps3-types --save-dev
Version compatibility
Angular versionLibrary version
v16, v17, v18v18.x

Usage

component.html
<div class="container">
  <y-map
    [props]="{
      location: {
        center: [-0.127696, 51.507351],
        zoom: 10,
      },
      theme: 'dark',
    }"
  >
    <y-map-default-scheme-layer />
  </y-map>
</div>
component.css
.container {
  width: 1000px;
  height: 500px;
}
tsconfig.json

Make sure that skipLibCheck is set to true, because @yandex/ymaps3-types uses Vue and React typings. If you do not set this option, you will not be able to build the application.

Standalone

component.ts
import { Component } from '@angular/core';
import { YMapComponent, YMapDefaultSchemeLayerDirective } from 'angular-yandex-maps-v3';

@Component({
  standalone: true,
  imports: [YMapComponent, YMapDefaultSchemeLayerDirective],
})
export class AppComponent {}
app.config.ts
import { ApplicationConfig } from '@angular/core';
import { provideYConfig, YConfig } from 'angular-yandex-maps-v3';

const config: YConfig = {
  apikey: 'API_KEY',
};

export const appConfig: ApplicationConfig = {
  providers: [provideYConfig(config)],
};

SCAM

app.module.ts
import { NgModule } from '@angular/core';
import {
  YConfig,
  YMapComponent,
  YMapDefaultSchemeLayerDirective,
  provideYConfig,
} from 'angular-yandex-maps-v3';

const config: YConfig = {
  apikey: 'API_KEY',
};

@NgModule({
  imports: [YMapComponent, YMapDefaultSchemeLayerDirective],
  providers: [provideYConfig(config)],
})
export class AppModule {}

Keywords

FAQs

Package last updated on 24 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc