[Chameleon] JSAPI - Keyboard Event Handlers
Deschamps,Paul [NCR]
Paul.Deschamps at ec.gc.ca
Thu Nov 17 15:36:03 EST 2005
Good day lists,
Well I am implementing some accessibility options on our map in development here and I have a question
The compaspoint (pan arrows). Is their a jsapi function to engage these buttons?
Perhaps I am being a bit lazy, instead of looking thru the .js file that handles CWCButton. However if someone has
already came across this it could save me some time. :)
I need to trigger the Locate widget and the compaspoint widgets via JS or any button for that matter.
Included is my js routine that shows you what I have done already
Thanks list.
Paul.
<script language=javascript>
<!--
// add a listener.
document.onkeydown = keyListener;
//Wrapper for IE
function keyListener(e){
if(!e){
//for IE
e = window.event;
}
// MAP SIZE key:1 -------------
if(e.keyCode==49){
changeMapSize('s',<? echo $_mapSize["s"]["width"] ?>, <? echo $_mapSize["s"]["height"] ?>);
}
// MAP SIZE key:2 -------------
if(e.keyCode==50){
changeMapSize('m',<? echo $_mapSize["m"]["width"] ?>, <? echo $_mapSize["m"]["height"] ?>);
}
// MAP SIZE key:3 -------------
if(e.keyCode==51){
changeMapSize('l',<? echo $_mapSize["l"]["width"] ?>, <? echo $_mapSize["l"]["height"] ?>);
}
// MAP ZOOM OUT key: O -------------
if(e.keyCode==79){
goCWCJSAPI.oMap.ZoomOut();
}
// MAP ZOOM IN key:I -------------
if(e.keyCode==73 ){
goCWCJSAPI.oMap.ZoomIn();
}
// MAP ZOOM ALL key:A -------------
if(e.keyCode==65 ){
goCWCJSAPI.oMap.ZoomFull();
}
// MAP PRINT key: P -------------
if(e.keyCode==80){
printerFriendly('<? echo strtolower($_itemType); ?>');
}
// MAP HELP key: H -------------
if(e.keyCode==72){
document.location.href= '<? echo $_basePath?>/cesiHelp.php?lang=<? echo $lang?>';
}
}
Paul Deschamps, UI Design / Graphic Artist
Integrated Environmental Applications Branch / Direction des Applications Environnementales Intégrés
Knowledge Integration Directorate / Direction générale de l'integration du savoir
Environment Canada / Environnement Canada
70 Crémazie, 7th Floor / 7e étage
Gatineau, Québec K1A 0H3
Tel / Tél: (819) 934-2986
E-mail / Courriel: Paul.Deschamps at ec.gc.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20051117/df51abe5/attachment.html
More information about the Chameleon
mailing list