Controls
Map control buttons: zoom, compass, locate, and fullscreen.
Basic Usage
# The ng-map-controls component renders map control buttons. Choose a corner with position and toggle individual controls with the show* inputs.
import { Component } from '@angular/core';
import { MapComponent, MapControlsComponent } from 'ng-mapcn';
@Component({
selector: 'app-controls-map',
standalone: true,
imports: [MapComponent, MapControlsComponent],
template: `
<div class="h-[420px]">
<ng-map [center]="[2.3522, 48.8566]" [zoom]="12">
<ng-map-controls
position="top-right"
[showZoom]="true"
[showCompass]="true"
[showLocate]="true"
[showFullscreen]="true"
/>
</ng-map>
</div>
`,
})
export class ControlsMapComponent {}