Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (37 sloc) 1.37 KB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Google Earth Search</title>
<script>
// Discover and use the appropriate jsapi key
switch(window.location.host){
case "localhost":
var jsapiKey = "ABQIAAAA6_3K-gCiIwLdvd1uci68ABQnZhpGFBlSBp4V-vX1TF0eV4YGpBR_9WBqiFC7qI99udoIXLs1r_cU4w";
break;
}
document.write(unescape('%3Cscript src="http://www.google.com/jsapi?key='+ jsapiKey +'"%3E%3C/script%3E'));
</script>
<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.0/jquery.min.js"></script>
<script>
// Load google Earth API
google.load("earth", "1");
google.setOnLoadCallback(function(){
google.earth.createInstance('gePlugin', function(instance){
window.gePlugin = instance;
instance.getLayerRoot().enableLayerById(instance.LAYER_BORDERS, true);
$(".ge-search").geSearch({gePlugin:instance});
});
});
</script>
<script src="jquery.gesearch.js"></script>
</head>
<body>
<h1>Google Earth Search</h1>
<p>jQuery plugin that enables Google Earth geo-coded searches.</p>
<input type="search" class="ge-search" placeholder="Search Earth!" autofocus>
<input type="button" class="ge-search" value="Search">
<div id="gePlugin" style="width:600px; height:450px;"></div>
</body>
</html>