I'm building a mobile application using HTML and JavaScript, I'm looking to have either a video, photo, or audio be displayed upon the user reaching a custom marker I have set on the map. The code I have so far is below. My question is how do I go about recognizing that the user is around my marker and how do I display audio, video, photos, or text upon the user reaching that location? This media will most likely be stored on a SQL server I've set up. If anyone can point me in the right direction, or let me know how to do this it would be much appreciated.
Thanks!
My code so far:
<!doctype html>
<html>
<head>
<title>Application Demo</title>
<meta name="viewport" conmtent="width=device-width, initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #mapcanvas {
margin: 0;
padding: 0;
height: 98%;
}
</style>
<script src="https://maps.googleapis.com/maps/api/js? v=3.exp&sensor=false"></script>
<script>
var map;
var coords = new google.maps.LatLng(36.995698, -86.762123);
function initialize() {
var mapOptions = {
zoom: 18,
center: coords,
mapTypeId: google.maps.MapTypeId.HYBRID
};
map = new google.maps.Map(document.getElementById('mapcanvas'),
mapOptions);
var marker = new google.maps.Marker({
position: coords,
map: map,
title: 'ITE',
});
}
</script>
</head>
<body onload="initialize()">
<div id="mapcanvas"></div>
<div>
<p>Maps provided by Google Maps</p>
</div>
</body>
</html>