Skip to content

Instantly share code, notes, and snippets.

@wenbert
Created August 11, 2010 16:19
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 wenbert/519247 to your computer and use it in GitHub Desktop.
Save wenbert/519247 to your computer and use it in GitHub Desktop.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" href="style.css" />
<title>Pley: Patt&#39;s Badminton Court</title>
<!-- CSS -->
<link rel="stylesheet" href="/css/style.css" type="text/css" media="screen, projection">
<!-- Framework CSS -->
<link rel="stylesheet" href="/css/blueprint/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print">
<!--[if lt IE 8]><link rel="stylesheet" href="/css/blueprint/ie.css" type="text/css" media="screen, projection"><![endif]-->
<!-- Import fancy-type plugin for the sample page. -->
<link rel="stylesheet" href="/css/blueprint/plugins/fancy-type/screen.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="/css/nicebutton.css" type="text/css" media="screen">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="/js/json_parse.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js "></script>
<!-- For V3 API -->
<script src="http://www.google.com/uds/api?file=uds.js&v=1.0" type="text/javascript"></script>
<script src="http://maps.google.com/maps/api/js?v=3.1&sensor=false&region=PH"></script>
</head>
<body>
<div class="container" id="header">
<div class="span-17">
<a href="/">
<img id="logo" src="/images/logo.png" border=0/>
</a>
</div>
<div id="navbar_sub" class="span-7 last">
<ul>
<li><a href="/accounts/logout">Logout</a></li>
<li><a href="/accounts/password/change">Change Password</a></li>
</ul>
</div>
<div id="navbar" class="span-17">
<ul>
<li><a href="/business/browse">Browse Businesses</a></li>
<li><a href="/business/add">Add Business</a></li>
</ul>
</div>
</div>
<div class="container">
<div id="page_name" class="span-24 last">
<p>Welcome, admin. Thanks for logging in.</p>
</div>
<div id="page_name" class="span-24 last">
<h1>Patt&#39;s Badminton Court</h1>
</div>
<div class="span-12" id="business_props">
<h2>Address</h2>
<ul class="boxed_list">
<li>ML Quezon<br/>
Cabancalan<br/>
Mandaue City, Cebu, Philippines<br/>
6014<br/>
</li>
</ul>
<h2>Contact Number</h2>
<ul class="boxed_list">
<li>test</li>
</ul>
<div class="buttons">
<a href="/review/add/3" class="button"><img src="/images/icons/add.png" alt=""/> <span>Add Review</span></a>
<a href="/review/add/3" class="button"><img src="/images/icons/image_add.png" alt=""/> <span>Add Photos</span></a>
</div>
<h2>Reviews</h2>
<ul class="boxed_list">
</ul>
</div>
<div class="span-12 last ">
<div id="map_canvas" style="width: 475px; height: 300px"></div>
<div id="map_message"></div>
<div id="searchwell"></div>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
// do stuff when DOM is ready
var geocoder = new google.maps.Geocoder();
var address = 'Patt&#39;s Badminton Court near: ML Quezon, Cabancalan, Cebu, Philippines, 6014';
var map;
// Our global state for LocalSearch
var gInfoWindow;
var gSelectedResults = [];
var gCurrentResults = [];
var gLocalSearch = new GlocalSearch();
if (geocoder) {
geocoder.geocode({ 'address': address }, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
//alert(results[0].geometry.location.lat())
//alert(results[0].geometry.location.lng())
//Create the Map and center to geocode results latlong
var latlng = new google.maps.LatLng(results[0].geometry.location.lat(), results[0].geometry.location.lng());
var myOptions = {
zoom: 14,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
gLocalSearch.setSearchCompleteCallback(this, OnLocalSearch);
//gLocalSearch.execute("debra heights wesleyan church");
gLocalSearch.execute("Patt&#39;s Badminton Court");
console.log("string_location: Patt&#39;s Badminton Court near: ML Quezon, Cabancalan, Cebu, Philippines, 6014");
}
else {
alert('No results found. Check console.log()');
console.log("Geocoding address: " + address);
console.log("Geocoding failed: " + status);
}
});
}
/*
Other functions
*/
function OnLocalSearch() {
if (gLocalSearch.results[0]) { //This is empty. Why?
console.log("var: "+gLocalSearch.results[0].lat);
var resultLat = gLocalSearch.results[0].lat;
var resultLng = gLocalSearch.results[0].lng;
var point = new google.maps.LatLng(resultLat,resultLng);
//callbackFunction(point);
}else{
alert("not found!");
}
}
});
//]]>
</script>
</div>
<div class="span-24 last">
&copy; Footer!
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment