Here you’ll find a map to our location and be able to find driving directions as well as store hours.
");
}
turns += "
" + turnNum + "\t" + turn.Text;
legDistance = turn.Distance;
// So we don't show 0.0 for the arrival
if(legDistance > 0)
{
// Round distances to 1/10ths
turns += " (" + legDistance.toFixed(1) + " miles";
// Append time if found
if(turn.Time != null)
{
turns += "; " + GetTime(turn.Time);
}
turns += ")
";
}
}
turns += "
";
}
// Populate DIV with directions
SetDirections(turns);
}
}
function SetDirections(s)
{
var d = document.getElementById("directions");
d.innerHTML = s;
}
// time is an integer representing seconds
// returns a formatted string
function GetTime(time)
{
if(time == null)
{
return("");
}
if(time > 60)
{ // if time == 100
var seconds = time % 60; // seconds == 40
var minutes = time - seconds; // minutes == 60
minutes = minutes / 60; // minutes == 1
if(minutes > 60)
{ // if minutes == 100
var minLeft = minutes % 60; // minLeft == 40
var hours = minutes - minLeft; // hours == 60
hours = hours / 60; // hours == 1
return(hours + " hour(s), " + minLeft + " minute(s), " + seconds + " second(s)");
}
else
{
return(minutes + " minutes, " + seconds + " seconds");
}
}
else
{
return(time + " seconds");
}
}
function ClearAll()
{
map.DeleteRoute();
SetDirections("");
map.PanToLatLong(defaultMap);
map.SetZoomLevel(6);
}
//Draw Circle
function GetCircle(circleLat, circleLon)
{
var R = 6371; // earth's mean radius in km
var lat = (circleLat * Math.PI) / 180; //rad
var lon = (circleLon * Math.PI) / 180; //rad
var d = parseFloat(tempDistance) / R; // d = angular distance covered on earth's surface
myCirclePoints = new Array();
for (x = 0; x