Skip to content

Instantly share code, notes, and snippets.

@jieter
Created November 28, 2013 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jieter/7689167 to your computer and use it in GitHub Desktop.
Save jieter/7689167 to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Test</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?libraries=geometry&amp;sensor=false"></script>
<style type="text/css">
#map {width:670px; height:600px;}
</style>
<script type='text/javascript'>
function initialize() {
var center = new google.maps.LatLng(51.42162000000001, -2.69789999999999);
var myOptions = {
zoom: 12,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new google.maps.Map(document.getElementById("map"), myOptions);
var decodedPath = google.maps.geometry.encoding.decodePath('c{|xHbo|OSnFrSjW~M{EnFwVz@wy@vQsq@cBoUzJ{EzObBrIcLfE~C~H{Y~C~CfOgY{EjM{EgTcLzTsSwQcGf@IoKgJSkMsb@RkR' +
'vVkRDon@SooBvBsXbGgE{@{EfE{EwLsXgEo{AcVgw@kRc|A_q@seAcLg@bBvQkCnKcGjCwQsSkM?cL{YjHrS{J~HgOwBgOjf@{Jj' +
'u@cLjRcGz^oUjW{Tni@f@jRsIj\wBjf@sNbo@wG~iArDnlArIj\bGfr@bQf^~WrSnPvVfOjHnURzc@cQbQzc@nUrtAbBfYkC~M~H' +
'nZ~Mz^f^_N~MrDbBwQkWsXR{E');
var path = new google.maps.Polyline({
path: decodedPath,
strokeColor: "#FF0000",
strokeOpacity: 1.0,
strokeWeight: 2,
map: map
});
map.fitBounds(path.getBounds());
}
</script>
</head>
<body onload="initialize()">
<div id="map"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment