我计划使用 esri(ArcGIS)和Angular 5 开发基于GIS的应用程序。我可以使用AngularJS(Angular 1)找到esri的示例代码,但无法使用Angular 4或5来获得esri的示例代码。我也尝试在YouTube上进行搜索,但我想找不到它。>
你们能帮我指出正确的方向吗?
谢谢。
答案 0 :(得分:0)
您可能已经发现了这一点,但对于其他人来说,esri-loader用于延迟加载esri类型... https://github.com/Esri/esri-loader
在角度4和角度8之间(打字稿3.3),角度版和从属打字稿版本均发生了重大变化。实际上,您可能会发现,将项目升级到angular 7或8比尝试使ESRI类型与旧版本的angular或打字稿兼容更容易。我正在使用7和打字稿3.2.4。 esri-loaded似乎在gitlab存储库中引用打字稿“打字稿”:“ ^ 3.3.4000”。
这是我当前的项目package.json,其中包含一个可工作的地图和esri类型,可用于angular 7参考:
"dependencies": {
"@angular/animations": "^7.2.12",
"@angular/cdk": "^7.3.7",
"@angular/common": "^7.2.12",
"@angular/compiler": "^7.212",
"@angular/core": "^7.2.12"+,
"@angular/forms": "^7.2.12",
"@angular/http": "^7.2.12",
"@angular/material": "^7.3.7",
"@angular/platform-browser": "^7.2.12",
"@angular/platform-browser-dynamic": "^7.2.12",
"@angular/platform-server": "^7.2.12",
"@angular/router": "^7.2.12",
"@clr/angular": "^1.1.2",
"@clr/icons": "^1.1.2",
"@clr/ui": "^1.1.2",
"@nguniversal/module-map-ngfactory-loader": "^5.0.0-beta.5",
"@types/arcgis-js-api": "^4.12.0",
"@webcomponents/custom-elements": "^1.0.0",
"angular2-jwt": "^0.2.3",
"aspnet-prerendering": "^3.0.1",
"bootstrap": "^3.4.1",
"classlist.js": "1.1.20150312",
"core-js": "^2.4.1",
"esri-loader": "^2.10.0",
"hammerjs": "^2.0.8",
"lodash": "^4.17.14",
"rxjs": "^6.4.0",
"rxjs-compat": "^6.0.0-rc.0",
"tslib": "^1.9.0",
"web-animations-js": "2.3.1",
"zone.js": "^0.8.29"
},
https://github.com/Esri/jsapi-resources/tree/master/4.x/typescript