最近使用Google地图和Google提供的API,经过半天的捉摸,终于弄好了。
程序主要实现的功能是将给定的IP地址使用第三方API查找大体位置(例如<省,城市>),然后根据位置用Google提供的接口找到经纬度,在Google地图上显示出来,不多说,直接上代码,新手,写得有点乱,见谅!
<head profile="">
<meta http-equiv="Content-Type" content="text/html; charset=GBK" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>MyLoadTester</title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false®ion=zh-CN"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script