当前位置: 编程技术>.net/c#/asp.net
使用asp.net调用谷歌地图api示例
来源: 互联网 发布时间:2014-08-25
本文导语: asp.net调用谷歌地图api,需要注意js引入的先后顺序,复制一下代码即可测试 //在这里要注意js引入的先后顺序 .photo { width: 300px; text-align: center; } .photo .ui-widget-header { margin: 1em 0; } .map { width: 350...
asp.net调用谷歌地图api,需要注意js引入的先后顺序,复制一下代码即可测试
//在这里要注意js引入的先后顺序
.photo
{
width: 300px;
text-align: center;
}
.photo .ui-widget-header
{
margin: 1em 0;
}
.map
{
width: 350px;
height: 350px;
}
.ui-tooltip
{
max-width: 350px;
}
$(function () {
$(document).tooltip({
items: "img, [data-geo], [title]",
content: function () {
var element = $(this);
if (element.is("[data-geo]")) {
var text = element.text();
return "
";
}
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");
})
});
大家可以点击复制测试一下