Class Dmp.Layers.MapComposition

mapComposition class

Class Summary
Constructor Attributes Constructor Name and Description
 
Maintains a list of LayerReference objects
Method Summary
Method Attributes Method Name and Description
 
addLayer(resObj)
add a layer to the mapComp
 
clear(none)
Removes all the layers from this mapcomposition
 
draw(null)
Re-draw all or a specific layer on the map
 
getBaseMap(none)
returns the map control that the mapComp is bound to (VEMap, Google Maps, etc)
 
uses the uniqueId to retrieve the layer.
 
 
returns a LayerReference(object) given the name of the Layer
 
getLayers(none)
retrieves the list of LayerReferences(objects) maintained by the mapComp
 
supports multiple layers of the same name
 
getScale(veMap)
converts zoom level to unitless scale
 
not implemented.
 
 
load(jqDom)
Takes an XML dom as input.
 
removeLayer(takes)
remove a layer from the mapComp
 
setCenter(layerName)
Center the map on this layer
Class Detail
Dmp.Layers.MapComposition(map)
Maintains a list of LayerReference objects
Parameters:
{map control} map
Returns:
instance
Method Detail
{void} addLayer(resObj)
add a layer to the mapComp
Parameters:
{LayerReference(object)} resObj
Returns:
{void}
{void} clear(none)
Removes all the layers from this mapcomposition
Parameters:
none
Returns:
{void}
{void} draw(null)
Re-draw all or a specific layer on the map
Parameters:
{param} null
OR LayerReference(object) OR uniqueId(string) p
Returns:
{void} re-draws the specified layers. Re-draws all layers if null is passed in
{map control} getBaseMap(none)
returns the map control that the mapComp is bound to (VEMap, Google Maps, etc)
Parameters:
none
Returns:
{map control} map
getLayerById(name)
uses the uniqueId to retrieve the layer. Helps to support multiple layers of the same name as well as layer re-ordering
Parameters:
{String} name
Returns:
an array of layer objects
getLayerByIndex(index)
Parameters:
{Integer} index
Returns:
a layer object
{LayerReference(object)} getLayerByName(name)
returns a LayerReference(object) given the name of the Layer
Parameters:
{String} name
Returns:
{LayerReference(object)} res
{Array} getLayers(none)
retrieves the list of LayerReferences(objects) maintained by the mapComp
Parameters:
none
Returns:
{Array} an array or list of LayerReferences
getLayersByName(name)
supports multiple layers of the same name
Parameters:
{String} name
Returns:
an array of layer objects
getScale(veMap)
converts zoom level to unitless scale
Parameters:
{Object} veMap
Returns:
unitless scale based on the current zoom level
getShapeLayer()
not implemented. Would otherwise return the shapeLayer of the map control
isUniqueName(name)
Parameters:
{String} name
Returns:
true if the layer name is unique
{void} load(jqDom)
Takes an XML dom as input. Parses through it and constructs a list of LayerReference objects
Parameters:
{dom} jqDom
Returns:
{void} mLayers of mapComp will be populated with LayerReference objects
{void} removeLayer(takes)
remove a layer from the mapComp
Parameters:
{param} takes
a layerName(String) or a LayerReference(object) paramRes
Returns:
{void} the specified layer is removed from the mapComp
{void} setCenter(layerName)
Center the map on this layer
Parameters:
{String} layerName
p
Returns:
{void} map view will be centered about p