We have maps, and we have the logic to save points of interest to databases and to move them in memory. The one thing we don't have is the code to handle the user actually creating and managing the pins from the map itself. It's time to rectify that situation and add in a MapEvents class that will handle this for us. Just like the MapGeocode, PinModel, and PinsModel classes, this class is a standalone implementation. Let's start by adding the following code:
export class MapEvents { private readonly geocode: MapGeocode; private infoBox: Microsoft.Maps.Infobox; constructor(private map: Microsoft.Maps.Map, private pinsModel: PinsModel, private poi: PointsOfInterestService) { }}
Infobox is the box that appears ...