MapChart.getBubbleLayer

Syntax

getBubbleLayer();

Description

The getBubbleLayer method returns the layer of map bubble factors.

Comments

The method returns a value of the SVGElement type.

Example

To execute the example the HTML page must contain the MapChart component named map (see Example of Creating the MapChart Component). Show all available bubble factors in the map and set 50% transparency for these factors:

// Get map bubble factors
var bubbleVisual = map.getLayer("Regions").getVisuals().BubbleVisual;
// Show the bubble factors
bubbleVisual.setVisibility(PP.Ui.Visibility.Visible);
// Redraw the map
map.draw();
// Get bubble factors layer
var bubbleLayer = map.getBubbleLayer();
// Set the layer opacity to 50%
bubbleLayer.style.opacity = 0.5;

After executing the example the map shows all available bubble factors with 50% transparency:

See also:

MapChart