How to install your map on Angular?

We don't have a module for Angular, but we have had customers successfully use the maps on Angular.

Here are instructions that a recent customer used with Angular 10:

1. I added these in my index.html

<script src="assets/js/countrymap.js"></script> <script src="assets/js/mapdata.js"></script>

2. In the very component where I needed to render the map, I had to import the js.

import ('src/assets/js/countrymap.js'); import ('src/assets/js/mapdata.js');

3. In my AfterViewInit Lifecycle hook,

ngAfterViewInit(): void { //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only. //Add 'implements AfterViewInit' to the class. this.enrolmentMonitorService.getMapVewData({}).subscribe((centers: CenterMarker[]) => { // this.noData = centers.length === 0; for (let i = 0; i < centers.length; i++) { const center = centers[i]; simplemaps_countrymap_mapdata.locations[i] = { name:, lat: center.latitude, lng: center.longitude, description: `Location: ${center.location}`}; } this.loading = false; simplemaps_countrymap.load(); })  }

(some of 3 is unique to the last customer's application, but should give you an idea of how to load the map)

The map will create a  simplemaps_countrymap object that can be loaded with simplemaps_countrymap.load().

This is for a countrymap, the variable will depend on the map (usmap, worldmap etc.)