校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 知識庫 > 使用asp.net調用谷歌地圖api示例

使用asp.net調用谷歌地圖api示例

熱門標簽:昆明語音電銷機器人價格 太原400電話上門辦理 柳州電銷機器人公司 400電話如何申請取消 浦發電話機器人提醒還款 電銷語音機器人型號參數 騰訊地圖標注手機 百度地圖怎樣做地圖標注 征途美甲店地圖標注

asp.net調用谷歌地圖api,需要注意js引入的先后順序,復制一下代碼即可測試

html xmlns="http://www.w3.org/1999/xhtml">
head>
title>/title>//在這里要注意js引入的先后順序
link href="Mapjs/jquery.ui.base.css" rel="external nofollow" rel="stylesheet" type="text/css" />
link href="Mapjs/jquery.ui.theme.css" rel="external nofollow" rel="stylesheet" type="text/css" />
script src="jquery-1.9.1.js" type="text/javascript">/script>

script src="Mapjs/jquery.ui.core.js" type="text/javascript">/script>

script src="Mapjs/jquery.ui.widget.js" type="text/javascript">/script>

script src="Mapjs/jquery.ui.position.js" type="text/javascript">/script>

script src="Mapjs/jquery.ui.tooltip.js" type="text/javascript">/script>

link href="Mapjs/demos.css" rel="external nofollow" rel="stylesheet" type="text/css" />
style type="text/css">
.photo
{
width: 300px;
text-align: center;
}
.photo .ui-widget-header
{
margin: 1em 0;
}
.map
{
width: 350px;
height: 350px;
}
.ui-tooltip
{
max-width: 350px;
}
/style>

script type="text/javascript">
$(function () {
$(document).tooltip({
items: "img, [data-geo], [title]",
content: function () {
var element = $(this);
if (element.is("[data-geo]")) {
var text = element.text();
return "img class='map' alt='" + text +
"' src='http://maps.google.com/maps/api/staticmap?" +
"zoom=11size=350x350maptype=terrainsensor=falsecenter=" +
text + "'>";
}
if (element.is("[title]")) {
return element.attr("title");
}
if (element.is("img")) {
return element.attr("alt");
}
}
});


$('#Button1').click(function () {
$('#AName').text($('#Text1').val());
$('#AName').attr('href', "http://maps.google.com/maps?q="+$('#Text1').val()+"z=11");

})

});
/script>

/head>
body>
div class="ui-widget photo">
div class="ui-widget-header ui-corner-all">
input id="Text1" type="text" value="China,上海" />input id="Button1" type="button"
value="設置" />
h3>
a  rel="external nofollow" data-geo id="AName">China,上海/a>/h3>
/div>
/div>
/body>
/html>

大家可以點擊復制測試一下

您可能感興趣的文章:
  • Google 靜態地圖API實現代碼
  • 利用谷歌地圖API獲取點與點的距離的js代碼
  • 百度地圖api應用標注地理位置信息(js版)
  • javascript使用百度地圖api和html5特性獲取瀏覽器位置
  • js 調用百度地圖api并在地圖上進行打點添加標注
  • 百度地圖API應用之獲取用戶的具體位置
  • 使用百度地圖api實現根據地址查詢經緯度
  • 百度地圖API之本地搜索與范圍搜索

標簽:張家界 天門 德陽 江蘇 陽泉 蘭州 白山 新疆

巨人網絡通訊聲明:本文標題《使用asp.net調用谷歌地圖api示例》,本文關鍵詞  使用,asp.net,調用,谷歌,地圖,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《使用asp.net調用谷歌地圖api示例》相關的同類信息!
  • 本頁收集關于使用asp.net調用谷歌地圖api示例的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 临西县| 水富县| 沛县| 辽阳市| 大方县| 正蓝旗| 金川县| 博白县| 淮阳县| 县级市| 阳朔县| 堆龙德庆县| 松江区| 武夷山市| 沙河市| 龙门县| 三门县| 博乐市| 佛学| 孝昌县| 恩平市| 永年县| 宜丰县| 辛集市| 鄂尔多斯市| 巩留县| 建瓯市| 友谊县| 四平市| 油尖旺区| 望谟县| 宁河县| 镇江市| 嘉兴市| 霸州市| 金乡县| 鹤岗市| 扶绥县| 黑山县| 怀远县| 汾阳市|