ControlsConfigSchema
constControlsConfigSchema:ZodObject<{attribution:ZodOptional<ZodUnion<[ZodBoolean,ZodObject<{compact:ZodOptional<ZodBoolean>;customAttribution:ZodOptional<ZodUnion<[ZodString,ZodArray<…, …>]>>;enabled:ZodOptional<ZodBoolean>;position:ZodOptional<ZodEnum<["top-left","top-right","bottom-left","bottom-right"]>>; },"strip",ZodTypeAny, {compact?:boolean;customAttribution?:string|string[];enabled?:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }, {compact?:boolean;customAttribution?:string|string[];enabled?:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }>]>>;fullscreen:ZodOptional<ZodUnion<[ZodBoolean,ZodObject<{enabled:ZodBoolean;position:ZodOptional<ZodEnum<["top-left","top-right","bottom-left","bottom-right"]>>; },"strip",ZodTypeAny, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }>]>>;geolocate:ZodOptional<ZodUnion<[ZodBoolean,ZodObject<{enabled:ZodBoolean;position:ZodOptional<ZodEnum<["top-left","top-right","bottom-left","bottom-right"]>>; },"strip",ZodTypeAny, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }>]>>;globe:ZodOptional<ZodUnion<[ZodBoolean,ZodObject<{enabled:ZodBoolean;position:ZodOptional<ZodEnum<["top-left","top-right","bottom-left","bottom-right"]>>; },"strip",ZodTypeAny, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }>]>>;navigation:ZodOptional<ZodUnion<[ZodBoolean,ZodObject<{enabled:ZodBoolean;position:ZodOptional<ZodEnum<["top-left","top-right","bottom-left","bottom-right"]>>; },"strip",ZodTypeAny, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }>]>>;scale:ZodOptional<ZodUnion<[ZodBoolean,ZodObject<{enabled:ZodBoolean;position:ZodOptional<ZodEnum<["top-left","top-right","bottom-left","bottom-right"]>>; },"strip",ZodTypeAny, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }>]>>;terrain:ZodOptional<ZodUnion<[ZodBoolean,ZodObject<{enabled:ZodBoolean;position:ZodOptional<ZodEnum<["top-left","top-right","bottom-left","bottom-right"]>>; },"strip",ZodTypeAny, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }, {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }>]>>; },"strip",ZodTypeAny, {attribution?:boolean| {compact?:boolean;customAttribution?:string|string[];enabled?:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };fullscreen?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };geolocate?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };globe?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };navigation?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };scale?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };terrain?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }; }, {attribution?:boolean| {compact?:boolean;customAttribution?:string|string[];enabled?:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };fullscreen?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };geolocate?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };globe?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };navigation?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };scale?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; };terrain?:boolean| {enabled:boolean;position?:"top-left"|"top-right"|"bottom-left"|"bottom-right"; }; }>
Defined in: packages/core/src/schemas/map.schema.ts:115
Map controls configuration.
Remarks
Section titled “Remarks”Configure which controls are displayed and their positions.
Available Controls:
navigation- Zoom and rotation controls (default: top-right)geolocate- User geolocation (default: top-right)scale- Distance scale (default: bottom-left)fullscreen- Fullscreen toggle (default: top-right)attribution- Attribution text (default: bottom-right)
Examples
Section titled “Examples”Enable All Controls
controls: navigation: true geolocate: true scale: true fullscreen: trueCustom Positions
controls: navigation: enabled: true position: top-left scale: enabled: true position: bottom-right