Controls
Open inPlace any content in the map's corners.
Usage
MglControl ([mglControl] / mgl-control) renders its projected content as a map control. Use position to choose a corner.
<mgl-map [mapStyle]="style" [center]="center" [zoom]="8"> <mgl-control position="bottom-left"> <a href="https://www.maptiler.com">MapTiler</a> </mgl-control></mgl-map>Native controls
Apply one of the native MapLibre control directives to a mgl-control to add the built-in control:
mglNavigation— zoom & compass.mglScale— scale bar.mglFullscreen— fullscreen toggle.mglGeolocate— locate the user.mglGlobe— projection toggle.mglAttribution— attribution.mglTerrain— terrain toggle.
<mgl-control mglNavigation position="top-right"></mgl-control><mgl-control mglScale unit="metric" position="bottom-right"></mgl-control>Looking for spartan/ui styled controls? See Map Controls.