JSFiddle - React, Tailwind, and code Playground

by Lorenzo Brutti

HTML

<!doctype html>
<html lang="en" dir="ltr">
	<head>
		<meta charset="utf-8">
		<title>Google Map Prototype</title>
		<style type="text/css">
			body {
				margin: 0;
				padding: 0;
			}
			
			/* We use set width/height dimensions because using percentages causes iOS resources to be exhausted!? */
			#map {
				height: 500px;
				left: 50%;
				margin: -225px 0 0 -350px;
				position: absolute;
				top: 50%;
				width: 700px;
			}
			
			#audiofile {
				display: none;
				
				/* iOS devices aren't hiding the element so we use a CSS3 trick to get the element out of view! */
				-webkit-transform: translate(-999em, 0);
				-moz-transform: translate(-999em, 0);
				-o-transform: translate(-999em, 0);
				transform: translate(-999em, 0);
			}
		</style>
	</head>
	<body>
		<audio id="audiofile" controls preload="auto" autobuffer> 
			<source src="sample.mp3" />
			<source src="sample.ogg" />
		</audio>
		<div id="map"></div>
		<!--
			Not using just standard Google Maps
			<script src="http://maps.google.com/maps/api/js?sensor=true"></script>
		-->
		<!--
			Now using Places library which also loads the Maps api
			Reference: https://code.google.com/apis/maps/documentation/javascript/places.html
		-->
		<script src="https://maps.googleapis.com/maps/api/js?libraries=places&sensor=true"></script>
		<script type="text/javascript">
			// Set-up new map instance (no location details specified yet)
			var map = new google.maps.Map(document.getElementById('map'), {
					mapTypeControl: true,
					mapTypeControlOptions: { 
						style: google.maps.MapTypeControlStyle.DROPDOWN_MENU 
					},
					mapTypeId: google.maps.MapTypeId.ROADMAP,
					streetViewControl: true
				}),
				infowindow = new google.maps.InfoWindow(),
				marker,
				latlng,
				watchID,
				audioelement = document.getElementById('audiofile');				
				
			/**
			 * Following property indicates whether the current rendering engine is Trident (i.e. Internet Explorer)
			 * 
			 * @return v { Integer|undefined...