佳木斯湛栽影视文化发展公司

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

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

熱門(mén)標(biāo)簽:客戶服務(wù) 科大訊飛語(yǔ)音識(shí)別系統(tǒng) 人工智能 國(guó)美全國(guó)運(yùn)營(yíng)中心 百度AI接口 網(wǎng)站排名優(yōu)化 電商新玩法 電銷(xiāo)業(yè)務(wù)

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)簽:南平 廈門(mén) 益陽(yáng) 攀枝花 咸寧 拉薩 POS機(jī) 棗莊

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《使用asp.net調(diào)用谷歌地圖api示例》,本文關(guān)鍵詞  ;如發(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)文章
  • 收縮
    • 微信客服
    • 微信二維碼
    • 電話咨詢

    • 400-1100-266
    分宜县| 西平县| 泗阳县| 高平市| 晋江市| 鄱阳县| 重庆市| 江阴市| 淳安县| 涿鹿县| 博湖县| 永登县| 鹤山市| 稷山县| 潮安县| 新乐市| 夹江县| 吴江市| 江川县| 陇西县| 金坛市| 栖霞市| 新野县| 长垣县| 贵定县| 麻江县| 沙雅县| 循化| 闸北区| 仙桃市| 天长市| 沅江市| 拉萨市| 封丘县| 北宁市| 额敏县| 营山县| 弋阳县| 中山市| 龙游县| 万州区|