Skip to content
This repository was archived by the owner on Apr 9, 2018. It is now read-only.

Commit 3322b3b

Browse files
authored
Merge pull request #7 from tomwayson/doc/types
added info on how to get types
2 parents eb037c4 + a06e7b1 commit 3322b3b

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@ export class EsriMapComponent implements OnInit {
5151
For an example of how to use this service to lazy load the ArcGIS API and resolve modules in a route, see
5252
[esri-angular-cli-example's esri-map-resolve.service.ts](https://github.com/tomwayson/esri-angular-cli-example/blob/ab4540912904cf78ccfd904fb3bfa4c69b4aa1da/src/app/esri-map/esri-map-resolve.service.ts).
5353

54+
## ArcGIS Types
55+
This service doesn't make any assumptions about which version of the ArcGIS API you are using, so you will have to manually install the appropriate types.
56+
57+
### 4.x Types
58+
Follow [these instructions](https://github.com/Esri/jsapi-resources/tree/master/4.x/typescript) to install the 4.x types.
59+
60+
Then you can use the `__esri` namespace for the types as seen in [this example](https://github.com/kgs916/angular2-esri4-components/blob/68861b286fd3a4814c495c2bd723e336e917ced2/src/lib/esri4-map/esri4-map.component.ts#L20-L26).
61+
62+
### 3.x Types
63+
Unfortunately the `__esri` namespace is not defined for 3.x types. You can use [these instructions](https://github.com/Esri/jsapi-resources/tree/master/3.x/typescript) to install the 3.x types, but then [you will still need to use `import` statements to get the types](https://github.com/Esri/jsapi-resources/issues/60). This may cause build errors that may or may not result in actual runtime errors depending on your environment.
64+
5465
## Examples
5566
This service is in use in these applications:
5667
- [esri-angular-cli-example](https://github.com/tomwayson/esri-angular-cli-example)

0 commit comments

Comments
 (0)