google map Search
来源:互联网 发布:淘宝网捕狗药网站 编辑:程序博客网 时间:2024/06/13 02:24
实现google 搜索功能.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Coder Page</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAA"
type="text/javascript"></script>
<script language="'Javascript'" type='text/javascript'>
var map = null;
var geocoder = null;
function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
geocoder = new GClientGeocoder();
}
}
function showAddress(address) {
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (!point) {
alert(address + " not found");
} else {
//alert(point + " not found");
map.setCenter(point, 13);
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml(address);
}
}
);
}
}
</script>
</head>
<body onload="load()" onunload="GUnload()">
<input type="text" size="60" name="address" id="addr"
value="India" />
<input type="button" value="Go!"
onclick="showAddress(document.getElementById('addr').value); return false"/>
<div id="map" style="width: 500px; height: 300px"></div>
</body>
</html>
- google's map search
- google map Search
- Google Map and Map Search 学习
- Search Google
- google search
- Google Map
- google map
- google map
- google map
- google map
- google map
- google map
- google map
- google map
- google map
- google map
- google map
- google map
- 庆祝在CSDN上开博成功
- 自己动手写basic解释器(七)
- 第25課
- (工具ffmpeg)视频转换为flv格式,视频截取图片(c#)
- static全局变量与普通的全局变量有什么区别?static局部变量和普通局部变量有什么区别?static函数与普通函数有什么区别?
- google map Search
- DOS下从硬盘安装XP系统
- WinCVS操作手册
- java开源工具简介 (1)
- 八种食品帮你吃掉体内废物
- java开源工具简介(2)
- 系统备份超级利器:一键GHOST v11.5硬盘版
- 独处与交往
- 一些小的JS实用代码