File

src/app/map/components/map-view.component.ts

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector app-map-view
styleUrls map-view.component.scss
templateUrl ./map-view.component.html

Index

Inputs

Inputs

markers

Type: Array<AgmPosition>

position

Type: AgmPosition

zoom

Default value: 4

import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { AgmPosition } from '../models/agm-position';

@Component({
  selector: 'app-map-view',
  templateUrl: './map-view.component.html',
  styleUrls: ['./map-view.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class MapViewComponent {
  @Input() position: AgmPosition = {latitude: 0, longitude: 0};
  @Input() zoom = 4;
  @Input() markers: Array<AgmPosition>;
}
<agm-map [latitude]="position.latitude"
         [longitude]="position.longitude"
         [zoom]="zoom">
  <agm-marker [latitude]="position.latitude"
              [longitude]="position.longitude">
  </agm-marker>
</agm-map>

Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""