ka-Map

Class kaTool

Object
   |
   +--kaTool
Direct Known Subclasses:
kaNavigator

class kaTool


kaTool API.
An API for building tools that work with kaMap. To create a new tool, you need to have included this file first. Next create a function to instantiate your new tool. All object construction functions must include a parameter that references the kaMap object on which they operate.
The object construction function must call the kaTool constructor using the following syntax:

kaTool.apply( this, [oKaMap] );

where oKaMap is the name of the parameter to the constructor function. You should then set the tool's name (this.name) and overload any functions for mouse handling etc.
Defined in kaTool.js


Field Summary
 Object bInfoTool
          info tools get all events all the time
 Object kaMap
          the instance of kaMap on which this tool operates
 Object name
          the name of this tool
 Object wheelMinus
          
 Object wheelPlus
          
 
Constructor Summary
kaTool ( <Object> oKaMap )
           
 
Method Summary
 void activate()
           activate this tool.
 Array adjustPixPosition( <Integer> x, <Integer> y )
           adjust a page-relative pixel position into a kaMap relative pixel position
 Object cancelEvent(<Event> e)
           provide a cross-platform method of cancelling events, including stopping of event bubbling and propagation.
 void deactivate()
           deactivate this tool.
 Object isInfoTool()
           is this an info tool or a regular tool?
 Object ondblclick(<Event> e)
           handle mouse doubleclicks on the viewport of the kaMap.
 Object onkeypress(<Event> e)
           handle keypress events.
 Object onmousedown(<Event> e)
           handle mouse down events on the viewport of the kaMap.
 Object onmousemove(<Event> e)
           handle mouse movement over the viewport of the kaMap.
 Object onmouseout(<Event> e)
           handle the mouse leaving the kaMap viewport.
 Object onmouseover(<Event> e)
           handle the mouse moving over the kaMap viewport.
 Object onmouseup(<Event> e)
           handle mouse up events on the viewport of the kaMap.
 void onmousewheel(<Event> e)
           Handle mouse wheel events over the viewport of the kaMap.
 void setMouseWheel(<array> minusSet, <array> plusSet)
           Set the object and function to call when the mouse wheel event triggers.

Field Detail

bInfoTool

Object bInfoTool

kaMap

Object kaMap

name

Object name

wheelMinus

Object wheelMinus

wheelPlus

Object wheelPlus

Constructor Detail

kaTool

kaTool( <Object> oKaMap )

Method Detail

activate

void activate()

adjustPixPosition

Array adjustPixPosition( <Integer> x, <Integer> y )

cancelEvent

Object cancelEvent(<Event> e)

deactivate

void deactivate()

isInfoTool

Object isInfoTool()

ondblclick

Object ondblclick(<Event> e)

onkeypress

Object onkeypress(<Event> e)

onmousedown

Object onmousedown(<Event> e)

onmousemove

Object onmousemove(<Event> e)

onmouseout

Object onmouseout(<Event> e)

onmouseover

Object onmouseover(<Event> e)

onmouseup

Object onmouseup(<Event> e)

onmousewheel

void onmousewheel(<Event> e)

setMouseWheel

void setMouseWheel(<array> minusSet, <array> plusSet)

ka-Map

Documentation generated by JSDoc on Mon Feb 5 08:25:15 2007