Search
DecorationLayer.parent Property
See Also
 






Gets the parent control of this layer.

Namespace: MindFusion.Mapping
File: DecorationLayer.js

 Syntax

JavaScript  Copy Code

get parent() {}

 Property Value

MapView. The parent control of this layer.

 Example

The following code checks what is the MapView that a DecorationLayer belongs to:

JavaScript  Copy Code

var m = MindFusion.Mapping;

// create a new instance of the mapView
var view = new m.MapView(document.getElementById("mapView"));

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

// 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";
markers.decorations.add(mark);
view.layers.add(markers);
..............................
................................


if(markers.mapView == view)
{
  //do something
}

 See Also