濮阳杆衣贸易有限公司

主頁(yè) > 知識(shí)庫(kù) > 使用asp.net調(diào)用谷歌地圖api示例

使用asp.net調(diào)用谷歌地圖api示例

熱門標(biāo)簽:昆明語(yǔ)音電銷機(jī)器人價(jià)格 太原400電話上門辦理 柳州電銷機(jī)器人公司 400電話如何申請(qǐng)取消 浦發(fā)電話機(jī)器人提醒還款 電銷語(yǔ)音機(jī)器人型號(hào)參數(shù) 騰訊地圖標(biāo)注手機(jī) 百度地圖怎樣做地圖標(biāo)注 征途美甲店地圖標(biāo)注

asp.net調(diào)用谷歌地圖api,需要注意js引入的先后順序,復(fù)制一下代碼即可測(cè)試

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="設(shè)置" />
h3>
a  rel="external nofollow" data-geo id="AName">China,上海/a>/h3>
/div>
/div>
/body>
/html>

大家可以點(diǎn)擊復(fù)制測(cè)試一下

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

標(biāo)簽:張家界 天門 德陽(yáng) 江蘇 陽(yáng)泉 蘭州 白山 新疆

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《使用asp.net調(diào)用谷歌地圖api示例》,本文關(guān)鍵詞  使用,asp.net,調(diào)用,谷歌,地圖,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《使用asp.net調(diào)用谷歌地圖api示例》相關(guān)的同類信息!
  • 本頁(yè)收集關(guān)于使用asp.net調(diào)用谷歌地圖api示例的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    平安县| 枞阳县| 宁阳县| 临夏县| 荣昌县| 县级市| 沽源县| 泸定县| 阳春市| 济宁市| 德州市| 友谊县| 南皮县| 曲靖市| 法库县| 潞西市| 乌审旗| 库伦旗| 平利县| 台州市| 洛南县| 石景山区| 东丰县| 永登县| 乌鲁木齐市| 陇西县| 灵石县| 临夏市| 台中市| 宁陕县| 绥阳县| 广饶县| 兖州市| 丰台区| 迭部县| 宾阳县| 江川县| 沾化县| 天全县| 石景山区| 慈利县|