首页 > 代码库 > 百度地图API相关点

百度地图API相关点

百度API接口:http://developer.baidu.com/map/jsdemo.htm#a1_1

百度地图API具体解释之地图标注:http://www.cnblogs.com/jz1108/archive/2011/09/15/2152122.html

【百度地图API】自行获取区域经纬度的工具:http://www.cnblogs.com/milkmap/archive/2012/02/23/2365064.html

酸奶小妹地图系统博客:http://www.cnblogs.com/milkmap/archive/2012/04/11/2442430.html

<?php
header("Content-Type:text/html;charset=utf-8");
require_once("../db_config.php");
?>
<?php
	$sql = "SELECT * FROM  `RetailersInfoTable` ";
	$query = mysql_query($sql);
	$location=NULL;
	$clat=0;
	$clng=0;
	$i = 0;
	if(mysql_num_rows($query))
	{
		while($row=mysql_fetch_array($query))
		{
			$i++;
			$location[]=array(
								"Longitude"=>$row["Longitude"],
								"Latitude"=>$row["Latitude"],
								"name"=>$row["RetailersName"],
								"kpname"=>$row["RetailersKP"],
								"kpphone"=>$row["RetailersLeaderPhone"],
								"rid"=>$row["RID"],
								"retailersid"=>$row["RetailersID"],
							);
			$clat+=$row["Latitude"];
			$clng+=$row["Longitude"];
		}
		 $clat = $clat/$i;   //平均全部点,以得出初始化定位点
		 $clng = $clng/$i;
	}
?>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>画弧线</title>
<link href=http://www.mamicode.com/"../images/css.css" rel="stylesheet" type="text/css">>

百度地图API相关点