Maps
A Maps React Component is a reusable UI element built using React that integrates mapping functionalities into a web application. It is often used to display geographical information, locations, or routes on an interactive map interface.
Type | Resource |
---|---|
Design | Figma |
Web | Web Storybook |
Code | Gitlab |
Usage
import MapsComponent from 'bio-bind-ui/components/Maps';
import React from 'react';
import MapsComponent from 'bio-bind-ui/components/Maps';
const PreviewMaps = () => {
return (
<div style={{ width: 800, height: 640 }}>
<MapsComponent />
</div>
)
}
export default PreviewMaps
Examples
Variant
Use variant for change different variants for the maps component: marker
or vector
Mode (Optional)
Use mode for change the color mode of maps component: light
or dark
Props
Props | Required | Default | Type | Description |
---|---|---|---|---|
id | true | - | number | string |
position | true | - | LatLngExpression | The position of the marker on the map. |
icon | false | - | { light: string; dark: string } | The icon for the marker, with separate values for light and dark modes. |
iconColor | false | - | { light: string; dark: string } | The icon color for the marker, with separate values for light and dark modes. |
markerProps | false | - | MarkerProps | Additional properties for the marker. |
popupContent | false | - | string | The content displayed in the popup when the marker is clicked. |
popupProps | false | - | PopupProps | Additional properties for the popup. |
mode | false | light | dark , light | The mode of the map or actions (dark or light). |
dataPinMarkers | false | - | DataPinMarker[] | An array of data pins with markers, each containing the necessary data for rendering. |
dataCircles | false | - | CircleProps[] | An array of circle properties to render on the map. |
dataRectangle | false | - | RectangleProps[] | An array of rectangle properties to render on the map. |
dataPolylines | false | - | PolylineProps[] | An array of polyline properties to render on the map. |