『壹』 php如何引入百度地圖或谷歌地圖,在目標位置定位
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/>
<style>
#map_canvas{
width:600px;height:450px;padding:4px;
}
#code_list{
background:nonerepeatscroll00#FFFF99;
border:1pxsolid#000000;
font-size:0.8em;
line-height:1.3em;
padding:5px;
}
</style>
<scriptsrc="http://ditu.google.com/maps?file=api&v=2&key=ABQIAAAAzr2EBOXUKnm_jVnk0OJI7xSosDVG8KKPE1-m51RBrvYughuyMxQ-i1QfUnH94QxWIa6N4U6MouMmBA&hl=zh-CN"
type="text/javascript"></script>
<scriptsrc="scripts/jquery-1.4.4.min.js"></script>
<scriptsrc="jquery.googlemaps.js"type="text/javascript"></script>
<scripttype="text/javascript">
$(document).ready(function(){
$('#map_canvas').googleMaps({
//設置地圖中心點
latitude:<?phpecho'42.351505';?>,
longitude:<?phpecho'-71.094455';?>,
//標注
markers:{
latitude:<?phpecho'42.351505';?>,
longitude:<?phpecho'-71.094455';?>
}
});
});
</script>
<title>無標題文檔</title>
</head>
<body>
<divstyle="float:left">
<h3>MapExamples</h3>
<divid="map_canvas"></div>
</div>
</body>
</html>
『貳』 怎麼再PHP 頁面樣式中加入地圖
頁面樣式如果指的是HTML 頁面的話是不需要涉及任何後端語言的。
以網路地圖為例網頁鏈接到創建地圖界面
下面有個復制代碼 就可以在你自己的頁面進行地圖引用
『叄』 怎麼在一個網頁上導入地圖在php中
放入google或者網路的地圖跟php沒關系,這2個API都是用js來調用的,你可以搜索google地圖api或者網路地圖api 應該會出來你想要的結果了
『肆』 thinkphp怎麼引入百度地圖
網路地圖api結合jquery ajax提交終於弄好了
function getStore(obj){
for (var i = 0; i < obj.length; i ++) {
var p0 = obj[i].point.split(",")[0];
varp1 = obj[i].point.split(",")[1];
var points = new BMap.Point(p0,p1);
var sContent = '' + ''+obj[i].store_name+''+ '
' + '地址:'+obj[i].address+'
電話:'+obj[i].store_tel+'
簡介:'+obj[i].about+'
' + '店鋪星級:
去逛逛>>'+ '';
var cate=obj[i].category;
var icon = new BMap.Icon('__PUBLIC__/Img/point.png', new BMap.Size(30, 45), {
infoWindowAnchor: new BMap.Size(10, 0)//設置標注圖片
});
addMarker(points,sContent,icon);
}
}
//上面是通過json交互過來的數據處理把店鋪坐標和相關的信息標注到頁面
$(function(){
window.onload = function() {
$.get('__URL__/searchStore',function(json){
getStore(json);
});
}
$(".wstore").click(function(){
map.clearOverlays();//清楚全部重新載入
var c=$(this).attr('val');
$.get('__URL__/searchStore',{c:c},function(json){
getStore(json);
});
})
$("#submit").click(function(){
map.clearOverlays();
//搜索店鋪
$.post('__URL__/searchStore',{name:$("#search").val()},function(json){
getStore(json);
});
})
})
『伍』 phpweb 開發怎麼接入地圖
:java 一般用eclipse開發,這個工具是開源的,背後有ibm支持,當然也有官方的netbens,我還是喜歡eclipse,android開發也可以在eclipse上搭建環境。 php的開發工具很多,我還是喜歡zend studio ,這個工具是基於eclipse開發的。
『陸』 php嵌入百度地圖怎麼設置地點
請求介面中有四個參數:
from: 被轉換的坐標體系
to: 轉換到這個坐標體系
x: 經度
y: 緯度
介面應答中有三個key:(應答格式如:{「error」:0,」x」:116.2610991221,」y」:29.820560874846})
error: 值為0時,則為成功,非0時,則為失敗
x: 目的經度,即網路坐標經度
y: 目的緯度,即網路坐標緯度
介面的使用示例
『柒』 PHP怎樣在網頁中嵌入帶標識的百度地圖
1,第一步當然是建立網路地圖放置的容器嘛,這個不解釋
<div class="s_r" style="float:left;width:680px;height:620px;margin-top:10px " id="container2"></div>
2,地圖旁增加一排文字,把標注點的信息一個一個都列出來,這個以後要用於和地圖上的標注連接起來的,在這邊點擊一下,地圖那邊標注相應的點就彈出提示信息了,樣式就是如下
<ul>
<u class="name"><a href="" target="_blank"id="list0">標注點1</a></u>
<li >簡介1</li>
<uclass="name"><a href="" target="_blank"id="list1">標注點2</a></u>
<li >簡介2</li>
</ul>
這個東西不要手工寫,最好用php把數組循環出來寫進去,這個數組就是你要標注的點的所有信息啊,比如名字,電話,標注點的經緯度,資料庫的id號等等,因為後面在javascript中也要用到這個php的數組,保持順序一致是很重要的,不要問我這個數組哪裡來,這個問自己...,我這邊的是這樣寫的,$areashoplist就是准備好的數組,$key是數組中元素的順序,寫在這里便於以後分辨連接.
『捌』 PHP怎樣做網站地圖
可以使用sitemap,也可以將網站主要欄目按照類別進行劃分,生成地圖
『玖』 怎麼向phpok中插入地圖
boolean tag = true;
final String pattern1 = "^([a-z0-9A-Z]+[-|//.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?//.)+[a-zA-Z]{2,}$";
final Pattern pattern = Pattern.compile(pattern1);
final Matcher mat = pattern.matcher(email);
if (!mat.find()) {
『拾』 php集成一個地圖插件,要求是點擊能夠獲取該地點的經緯度
0..0 ,肯定需要地圖插件的介面返回值的。。如你用網路地圖,有相對的介面,直接用就行。