JS API
- Parameters
- Options
- Example
- Methods
- fitToBoundingBox
- getBoundingBox
- getInitialBoundingBox
- getLayers
- getMouseMode
- off
- on
- once
- refresh
- reset
- setMouseMode
- usingLayer
- usingNewLayer
- Events
- Parameters
- Example
- Methods
- addFeature
- addFeatureCollection
- bringForwards
- bufferGeometry
- changeProperties
- clearFilters
- clearFeatures
- clearStyle
- clipByFeatureCollection
- convertToCentroids
- filterByBoundingBox
- filterByFeatureCollection
- filterByNearest
- filterByText
- getFeatureCollection
- hide
- sendBackwards
- show
- style
- update
- usingFeature
getLayers
Returns a list of information about the layers associated with the map.
Parameters
No parameters.
Example
var map = new Mapzania.Map("map-div", "WORLD", function(){
var layers = map.getLayers();
console.log(layers);
});
//OUTPUT
[
{
key:"STREETS",
name:"Street Layer",
ordinal:0,
visible:true
},
{
key:"SUBURBS",
name:"Suburb Layer",
ordinal:1,
visible:false
}
]