xieziyu / ngx-amap

angular 2+ component for AMap (Gaode map)
https://xieziyu.github.io/ngx-amap
MIT License
148 stars 42 forks source link

编译时找不到类型定义报错 #68

Open ygwoo opened 4 years ago

ygwoo commented 4 years ago

使用ngx-amap版本为"ngx-amap": "^3.0.5", 我在项目devDependencies中安装了类型依赖 "@types/amap-js-api": "^1.4.7", "@types/amap-js-api-autocomplete": "^1.4.0", "@types/amap-js-api-city-search": "^1.4.0", "@types/amap-js-api-geocoder": "^1.4.0", "@types/amap-js-api-geolocation": "^1.4.0",

angualr环境为: Angular CLI: 8.3.21 Node: 13.12.0 OS: darwin x64 Angular: 8.2.14 ... animations, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router

Package Version

@angular-devkit/architect 0.803.21 @angular-devkit/build-angular 0.803.21 @angular-devkit/build-optimizer 0.803.21 @angular-devkit/build-webpack 0.803.21 @angular-devkit/core 8.3.21 @angular-devkit/schematics 8.3.21 @angular/cdk 8.2.3 @angular/cli 8.3.21 @ngtools/webpack 8.3.21 @schematics/angular 8.3.21 @schematics/update 0.803.21 rxjs 6.5.3 typescript 3.5.3 webpack 4.39.2 报错代码: image 加载高德AMap.Geolocation插件时编译报错,程序能正常运行,是否是 "@types/amap-js-api": "^1.4.7",缺少相关类型定义造成的? 报错截图: image