Search
Decoration.element Property
See Also
 






Returns a reference to the decoration DOM element.

Namespace: MindFusion.Mapping
File: Decoration.js

 Syntax

JavaScript  Copy Code

get element() {}

 Property Value

HTMLDivElement

 Example

The following code creates a new DecorationLayer and adds a new Marker to the layer's decorations property. It makes the Marker fully transparent by using the style attribute of its element property. The Marker class derives from Decoration.

JavaScript  Copy Code

var m = MindFusion.Mapping;

var markers = new m.DecorationLayer("Images");

// create some markers with images
var mark = new m.Marker(new m.LatLong(-22.951916, -43.210487));
mark.imageSrc = "./images/christ_redeemer.png";
mark.text = "Christ the Redeemer";
mark.element.style.opacity = 0;
markers.decorations.add(mark);

 See Also