Angular4 and multiple maps in a component

699
1
11-06-2017 01:48 PM
JamesSamek
New Contributor III

Angular 4: If I have a module with a component that shows a 4.x map, can I use that component more than once in another component? Getting errors related to "the API is already loaded" and only one map is shown...

Tags (1)
0 Kudos
1 Reply
CharlieElverson
New Contributor II

Are you using the Angular-Esri-Loader? It sounds like each instance of your component is calling EsriLoaderServive.load(). You could try putting the map creation code into an angular service, instead of loading the API in the component file itself.