Last Updated on : 2021-09-10 08:43:53download
This topic introduces the interface for using the gyroscope map component in the sweeper panel SDK.
Parameter | Data type | Description | Default value |
---|---|---|---|
width | Number | Map component width | Screen width |
height | Number | Map component height | Screen height |
radius | Number | The radius of the circle, or the radius of the rectangle (if it is square, it means half of the side length) | 1 |
space | Number | Interval between each point | |
maxZoomScale | Number | Maximum magnification of the map | 4 |
clearData | Boolean | Clear current map data. true or false | false |
pointType | String | Data point Image type circle or square |
‘square’ |
scale | Object | Center point zoom ratio {x: number; y: number; scale: number} | {} |
data | Array | Incremental data point array [{ x:number, y:number, color:#ffffff }] | [] |
currentPos | Object | Current point position (i.e. where the sweeper is located) {x: number, y: number} |
{} |
markerIcon | String | The picture url of the sweeper | ‘’ |
pilePosition | Object | The coordinates of the charging pile {x: number, y: number} |
{} |
pileIcon | String | Charging pile icon url | ‘’ |
barrierColor | String | Obstacle point color, type is #ARGB and #RGB | ‘#FFFFFF’ |
strokeWidth | Number | Stroke width | 1 |
strokeColor | Number | Stroke color | ‘#D9F6B4’ |
limitPointNum | Number | Threshold | 3 |
pointColor | String | The color of the cleaning point, used to fill the point | ‘#D9F6B4’ |
import { RCTGyroMap } from '@tuya/tuya-panel-robot-sdk'
class GyroMap extends Component {
render() {
return <RCTGyroMap {...this.props} />;
}
}
Is this page helpful?
YesFeedbackIs this page helpful?
YesFeedback