大家知道arcgis 键盘可以操作地图的前进后退, 我碰到一个需求需要在触屏面板 去操作键盘事件
我发现arcgis 并没有提供相应的api,于是我构建了一个触屏可以操作键盘上下左右 前进后退的模拟类
```javascript
import {esriClass, esriClassName} from "../tool/EsriClass";
export enum KeyToNumber {
ArrowDown = 3,
ArrowLeft = 0,
ArrowRight = 1,
ArrowUp = 2,
a = 6,
d = 7,
j = 5,
s = 9,
u = 4,
w = 8
}
class GamepadKeybordMonitorClass {
cameraControllerKeyboard: any;
constructor(){
}
async handleKeyDown(view : any, key: number) {
let disableMovements: any = {
ascend: true,
mode: "local",
更多参考 https://xiaozhuanlan.com/topic/6037452819
网友评论