A method that returns the underlying datasets of the map.
Return |
Value |
---|---|
object: |
A dataset array. |
Example:
var ds = map.getDatasets();
for (var i = 0, c = ds.length; i < c; i++)
{
var my_id = ds[i].id;
var my_name = ds[i].name;
var my_visible = ds[i].visible;
var my_scales = ds[i].scales;
if (my_visible)
{
var ml = ds[i].layers;
for (var ii = 0, cc = ml.length; ii < cc; ii++)
{
var my_ml_id = ml[ii].id;
var my_ml_name = ml[ii].name;
var my_ml_visible = ml[ii].visible;
if (my_ml_visible)
{
//Your code here!
}
}
//Your code here!
}
}