<!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...
Please Whitelist JSFiddle in your content blocker.
Help keep JSFiddle free for always by one of two ways:
Whitelist JSFiddle in your content blocker (two clicks)
Go PRO and get access to additional PRO features →
Join the 4+ million users, and keep the JSFiddle dream alive.
Ad-free
All ads in the editor and listing pages are turned completely off.
Use pre-released features
You get to try and use features (like the Palette Color Generator) months before everyone else.
Fiddle collections
Sort and categorize your Fiddles into multiple collections.
Private collections and fiddles
You can make as many Private Fiddles, and Private Collections as you wish!
Console
Debug your Fiddle with a minimal built-in JavaScript console.