Google 使用 Ionic 进行地图和地理定位:对象不是函数
Google maps and geolocation with Ionic: Object is not a function
我目前正在研究一个项目,我需要用 Ionic 4 复制像 Runastic 这样的运动应用程序 - Angular
为此,我尝试在我的应用程序中添加地图(Google 地图)以及地理定位系统。
为了集成 google 地图,我遵循了本教程:
https://ramsatt.com/2019/02/19/ionic-4 - google-map - part-1 - simple-map/
目前它有效,但我阻止了教程的这一部分:
http://ramsatt.com/2019/05/02/ionic-4 - google-地图 - part-1 - 地理位置/
当我转到我的地图所在的页面时遇到此错误:
Error: Uncaught (in promise): TypeError: Object(...) is not a function
TypeError: Object(...) is not a function
at Geolocation.Array.concat.Geolocation.getCurrentPosition (http://localhost:8100/build/0.js:9874:143)
at GeolocationPage.Array.concat.GeolocationPage.ngAfterViewInit
而我的系统配置:
离子框架:3.9.5
离子应用程序脚本:3.2.2
Angular核心:5.2.11
Angular 编译器 CLI:^7.2.15
节点:10.15.2
感谢您的帮助。
问题已解决。
我创建了一个基本的拟议离子项目,但使用的离子版本是 3 而不是 4....
我目前正在研究一个项目,我需要用 Ionic 4 复制像 Runastic 这样的运动应用程序 - Angular
为此,我尝试在我的应用程序中添加地图(Google 地图)以及地理定位系统。
为了集成 google 地图,我遵循了本教程: https://ramsatt.com/2019/02/19/ionic-4 - google-map - part-1 - simple-map/
目前它有效,但我阻止了教程的这一部分: http://ramsatt.com/2019/05/02/ionic-4 - google-地图 - part-1 - 地理位置/
当我转到我的地图所在的页面时遇到此错误:
Error: Uncaught (in promise): TypeError: Object(...) is not a function TypeError: Object(...) is not a function at Geolocation.Array.concat.Geolocation.getCurrentPosition (http://localhost:8100/build/0.js:9874:143) at GeolocationPage.Array.concat.GeolocationPage.ngAfterViewInit
而我的系统配置:
离子框架:3.9.5
离子应用程序脚本:3.2.2
Angular核心:5.2.11
Angular 编译器 CLI:^7.2.15
节点:10.15.2
感谢您的帮助。
问题已解决。
我创建了一个基本的拟议离子项目,但使用的离子版本是 3 而不是 4....