Control
Provides interface components for map controls such as navigation buttons, scale bars, etc.
The Control component is used to add various control elements to your map, which enhance the user's interaction with the map.
Props
The following table lists the props for the Control
component:
type*
string
Specifies the type of control to add. Accepted values: navigation
, scale
, attribution
, fullscreen
, geolocate
, language
, traffic
.
β
options
object
{}
position
string
Determines the position of the control on the map. Choices: top-left
, top-right
, bottom-left
, bottom-right
.
top-right
* indicates a required property.
Optional Dependencies
To use some of the control types, you will need to install optional dependencies. Below are the instructions for installing these dependencies using pnpm
.
Example
Here is an example of how to integrate the Control
component within the MapGL
component from solid-map-gl
.
Last updated