Gets the collection of MapLayer-s.
Namespace: MindFusion.Mapping
File: MapView.js
JavaScript Copy Code |
---|
get mapLayers() {} |
ObservableCollection. A collection of MapLayer instances.
The following code creates a new MapView using a <DIV> element called "mapview" that we've declared in the HTML code of the page. It checks if there are any MapLayer-s added to the view and if there are none - adds one:
JavaScript Copy Code |
---|
// create a new instance of the mapView if(view.mapLayers.count() == 0) view.layers.add(l); |