function create_markers(map, locations, infowindow) {

	/*
	 * following variable are created by mp_add_to_script.php
	 * - let icon_color = ""
	 * - let icon_color_back = ""
	 * - let icon_size = [x, y]
	 * - let cluster_size_factor = Number
	 * - let icon_stroke_width = Number
	 */

	let icon_circle_radius = 40 - icon_stroke_width / 2;

	let markers = [];
	for (loc of locations) {

		if (loc.coordinates == null)
			continue;

		let count = loc.events.length;

		let marker_icon_size = [
			icon_size[0] + ( icon_size_factor * (count - 2) ),
			icon_size[1] + ( icon_size_factor * (count - 2) )
		];
		let svg_icon = window.btoa(`
			<svg xmlns="http://www.w3.org/2000/svg" width="${marker_icon_size[0]}" height="${marker_icon_size[1]}">
				<circle cx="50%" cy="50%" r="${icon_circle_radius}%" stroke="${icon_color}" stroke-width="${icon_stroke_width}" fill="${icon_color_back}" />
			</svg>
		`);
		let icon_options = {
			url: `data:image/svg+xml;base64,${svg_icon}`,
			scaledSize: new google.maps.Size(marker_icon_size[0], marker_icon_size[1]),
		};
		let marker_label = {
			text: String(count),
			color: icon_color,
			fontSize: "12px",
			fontWeight: "bold",
		};
		let marker_title = `address of ${count} events`;

		let marker = new google.maps.Marker({
			position: loc.coordinates,
			map: map,
			icon: icon_options,
			title: marker_title,
			label: marker_label,
		});

		attach_info_window(map, marker, loc.events, infowindow);

		markers.push(marker);
	};

	return markers;
}
