SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A class which encapsulates a value-key pair of layername and shapefile.
Author: JAN, KUNConstructor Summary | |
IWLayer(map, layerTitle, layerName, idfLayerName)
Creates a new layer object. |
Method Summary | |
void
|
add(node)
Overwrites function to prevent layer from adding children |
void
|
addLayer(node)
Delegates to add() and throws exception.
|
void
|
addShape(newShape)
Adds a new shape to the layer. |
void
|
collapse(node)
Overwrites function to prevent layer collapse |
void
|
expand(node)
Overwrites function to prevent layer expand |
String
|
getCurrentShapeName(newZoomLevel)
Returns the name of the shape file which is currently visible on the map. current zoomlevel. |
String
|
getIdfLayerName()
Returns the name of the idflayer. |
String
|
getLayerName()
Returns the name of the layer. |
String
|
getLayerTitle()
Returns the title of the layer. |
IWShape[]
|
getShapes()
Returns all shapes. |
int
|
getUseLabelsOrTilesForDrawing()
Returns IWLayer.DRAW_ON_TILES or IWLayer.DRAW_ON_LABELS
|
boolean
|
isVisible()
Checks if this layer is visible or not. |
boolean
|
removeShape(shapeName)
Removes shape from this layer. |
void
|
setIdfLayerName(newIdfLayerName)
Sets the name of the idflayer. |
void
|
setLayerName(newLayerName)
Sets the name of the layer. |
void
|
setLayerTitle(layerTitle)
Sets the title of the layer. |
void
|
setUseLabelsOrTilesForDrawing(labelsOrTiles)
|
void
|
setVisibility(visibility)
Sets the visibilty for the Layer |
String
|
toString()
Returns a string representation of this layer. |
Event Summary | |
void
|
triggerOnRemove()
The onremove is fired when a layer is removed from map. Register an event listener with IWEventManager.addListener(myLayer, 'onremove', yourHandlerMethod()); to receive the event. |
Methods inherited from class IWLayerInterface |
setUseDefaults(useDefaults) |
useDefaults() |
setVisible(visible) |
Methods inherited from class IWNodeElement |
setParent(newParent) |
hasChildren() |
hasChild() |
getChildren() |
getParent() |
remove(node) |
getName() |
setName(newName) |
checkIfExistsAsParent(node) |
mark() |
unmark() |
isMarked() |
isCollapsed() |
Constructor Detail |
IWLayer(map, layerTitle, layerName, idfLayerName)
IWMap map
String layerTitle
- title of the layer
String layerName
- the name of the layer
String idfLayerName
- the name of the idflayer
Method Detail |
void add(node)
IWNodeElement node
void
void addLayer(node)
add()
and throws exception. Layer is not allowed to add children.
IWNodeElement node
void
void addShape(newShape)
IWShape newShape
- the shape
void
void collapse(node)
IWNodeElement node
void
void expand(node)
IWNodeElement node
void
String getCurrentShapeName(newZoomLevel)
int newZoomLevel
- the next zoomlevel
String
shapefile
String getIdfLayerName()
String
idflayername
String getLayerName()
String
layername
String getLayerTitle()
String
layerTitle
IWShape[] getShapes()
IWShape[]
int getUseLabelsOrTilesForDrawing()
IWLayer.DRAW_ON_TILES
or IWLayer.DRAW_ON_LABELS
int
boolean isVisible()
boolean
true if this layer is visible otherwise false.
boolean removeShape(shapeName)
String shapeName
boolean
void setIdfLayerName(newIdfLayerName)
String newIdfLayerName
void
void setLayerName(newLayerName)
String newLayerName
void
void setLayerTitle(layerTitle)
String layerTitle
void
void setUseLabelsOrTilesForDrawing(labelsOrTiles)
int labelsOrTiles
- possible values are IWLayer.DRAW_ON_TILES
and
IWLayer.DRAW_ON_LABELS
void
void setVisibility(visibility)
Boolean visibility
void
String toString()
String
Event Detail |
void triggerOnRemove()
Register an event listener with IWEventManager.addListener(myLayer, 'onremove', yourHandlerMethod()); to receive the event.
void