function addInfoBubble(map) {
		var group = new H.map.Group();
		map.addObject(group);

		group.addEventListener(
			'tap',
			function (evt) {
				var bubble = new H.ui.InfoBubble(evt.target.getGeometry(), {
					content: evt.target.getData(),
				});

				ui.addBubble(bubble);
			},
			false
		);

		coffeeShops.forEach(function (shop) {
			addMarkerToGroup(
				group,
				{ lat: shop.latitude, lng: shop.longitude },
				'<div><a href="' +
					shop.website +
					'" target="_blank">' +
					shop.name +
					'</a></div>' +
					'<div>' +
					shop.address +
					'</div>'
			);
		});
	}
// Function that adds InfoBubble above the markers when clicked
Function that adds InfoBubble above the markers when clicked
Function that adds InfoBubble above the markers when clicked
function addInfoBubble(map) {
		var group = new H.map.Group();
		map.addObject(group);
		group.addEventListener(
			'tap',
			function (evt) {
				var bubble = new H.ui.InfoBubble(evt.target.getGeometry(), {
					content: evt.target.getData(),
				});
				ui.addBubble(bubble);
			},
			false
		);
		coffeeShops.forEach(function (shop) {
			addMarkerToGroup(
				group,
				{ lat: shop.latitude, lng: shop.longitude },
				'<div><a href="' +
					shop.website +
					'" target="_blank">' +
					shop.name +
					'</a></div>' +
					'<div>' +
					shop.address +
					'</div>'
			);
		});
	}
function addInfoBubble ( map ) { var group = new H . map . Group ( ) ; map . addObject ( group ) ; group . addEventListener ( 'tap' , function ( evt ) { var bubble = new H . ui . InfoBubble ( evt . target . getGeometry ( ) , { content : evt . target . getData ( ) , } ) ; ui . addBubble ( bubble ) ; } , false ) ; coffeeShops . forEach ( function ( shop ) { addMarkerToGroup ( group , { lat : shop . latitude , lng : shop . longitude } , '<div><a href="' + shop . website + '" target="_blank">' + shop . name + '</a></div>' + '<div>' + shop . address + '</div>' ) ; } ) ; }
Function that adds InfoBubble above the markers when clicked
Function that adds InfoBubble above the markers when clicked