Skip to content

Map Layer Visibility

Version Requirement

Map layer visibility feature requires SDK version 1.0.140 or above.

setBackCustomImg(img) -> {void}

Set custom background image

Parameters

Name Data Type Description
img string/Image Image address or image object

Return value

none

Example

JavaScript
1
2
3
4
...
const img = require('./6.png')
await axMap.setBackCustomImg(img)
...

showMapImgLayer(visible) -> {Promise<void>}

Set map layer visibility

Parameters

Name Data Type Description
visible boolean true to show, false to hide

Return value

Promise

Example

JavaScript
1
2
3
4
5
6
...
// Hide map layer
await axMap.showMapImgLayer(false)
// Show map layer
await axMap.showMapImgLayer(true)
...

showLineStringLayer(visible) -> {Promise<void>}

Set line layer visibility

Parameters

Name Data Type Description
visible boolean true to show, false to hide

Return value

Promise

Example

JavaScript
1
2
3
4
5
6
...
// Hide line layer
await axMap.showLineStringLayer(false)
// Show line layer
await axMap.showLineStringLayer(true)
...

showPointLayer(visible) -> {Promise<void>}

Set point layer visibility

Parameters

Name Data Type Description
visible boolean true to show, false to hide

Return value

Promise

Example

JavaScript
1
2
3
4
5
6
...
// Hide point layer
await axMap.showPointLayer(false)
// Show point layer
await axMap.showPointLayer(true)
...