MapContext.showsCompass
Set the visibility of the compass.
- 1: visible.
- 0: invisible.
Parameter
The parameter is in object type and has the following property:
| Property | Type | Required | Description |
| isShowsCompass | Int | Yes | An indicator of whether the compass is visible. |
Sample code
copy
this.mapCtx = my.createMapContext('map');
this.mapCtx.showsCompass({isShowsCompass:1});Error code
Error code | Error message | Further action |
2 | Invalid parameters | Refer to the previous Parameters table to ensure that all parameters are specified correctly, and that all required parameters are provided. |