[Chameleon] How do you set/get what tool is active with JSAPI?

Ken Sanderson ken at rockies.ca
Thu Jul 29 15:00:56 EDT 2004


Hello. I have been getting a bit of a JSAPI script to work, pretty basic
at this point, but if I can get the basic to work then after that its
all javascript and php unrelated to Chameleon, so simple is good.

One thing I noticed in the JSAPI docs is that at the end it still
references goCWCApp as the application object, but it should be
goCWCJSAPI. Also mouseclick[#] as mentioned under the MOUSE_CLICKED
example is not a property of oMap, it's a property of the application,
which is goCWCJSAPI. So it should be goCWCJSAPI.mouseclick[0].

On to my question. I have my little script working for mouse click on
the map. It pops up an alert box that gives me the geographic coords of
the place clicked. The problem I have is that I cant find a way to set
or retrieve what tool is currently active. I only want my script to
function if my tool is the one that's currently active, if zoomin is
selected then the map should zoomin as per normal.

How can I interface with the tools in this manner?

Thanks,

Ken
Miistakis






More information about the Chameleon mailing list