|
Community Map Builder 21 Aug 2007 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--ToolBase | +--FeatureSelectHandler
Defined in FeatureSelectHandler.js
Author: Andreas Hocevar andreas.hocevarATgmail.com
Field Summary | |
Object |
map
Map for this FeatureSelectHandler. |
Object |
selectStyle
|
Object |
sourceModels
|
Fields inherited from class ToolBase |
model, toolNode
|
Constructor Summary | |
FeatureSelectHandler
(toolNode, model)
Manages mouseover and clicks on vector features in the map. |
Method Summary | |
void
|
configInit(objRef)
Tool Initialisation - Step 1 of 3. |
void
|
contextInit(objRef)
Tool Initialisation - Step 2 of 3. |
void
|
dehighlight(objRef, fid)
Dehighlights the specified feature. |
void
|
highlight(objRef, fid)
Highlights the specified feature. |
Object
|
init(objRef)
Tool Initialisation - Step 3 of 3. |
void
|
onClick(evt)
This method is triggered when a user clicks on a feature. |
void
|
onHover(evt)
This method is triggered when the mouse is over a feature. |
void
|
onSelect(feature)
This method is triggered when the mouse is over a vector feature. |
void
|
onUnselect(feature)
This method is triggered when the mouse is moving out of a vector feature. |
Methods inherited from class ToolBase |
initTargetModel, initMouseHandler
|
Field Detail |
Object map
Object selectStyle
Object sourceModels
Constructor Detail |
FeatureSelectHandler(toolNode, model)
toolNode
- The tool node from the config XML file.
model
- The model containing this tool.
Method Detail |
void configInit(objRef)
objRef
- This object
void contextInit(objRef)
objRef
- This object
void dehighlight(objRef, fid)
objRef
- reference to this tool object
fid
- GML feature id of the feature to highlight. If not specified, this is taken from the dehighlightFeature model param.
void highlight(objRef, fid)
objRef
- reference to this tool object
fid
- GML feature id of the feature to highlight. If not specified, this is taken from the highlightFeature model param.
Object init(objRef)
objRef
- reference to this object.
void onClick(evt)
evt
- OpenLayers event
void onHover(evt)
evt
- OpenLayers event
void onSelect(feature)
- for the info popup, we need the screen coordinates which we do not get from the handler directly. - when the active tool changes, something in the priority of OL event handlers changes, so the click event on the feature gets lost. By registering our priority handler and calling Event.stop() in the target method, we make sure that our event is handled and no other event handlers are triggered.
feature
- OpenLayers feature
void onUnselect(feature)
feature
- OpenLayers feature
|
Community Map Builder 21 Aug 2007 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |