jQuery根據(jù)緯度經(jīng)度查看地圖處理程序
更新時(shí)間:2013年05月08日 17:53:12 作者:
jQuery根據(jù)緯度經(jīng)度查看地圖處理程序如下在這里要注意js的引入順序,有需求的朋友可以參考下哈希望對(duì)你有所幫助
復(fù)制代碼 代碼如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
//在這里要注意js的引入順序
<link href="css/jquery.ui.base.css" rel="stylesheet" type="text/css" />
<link href="css/jquery.ui.theme.css" rel="stylesheet" type="text/css" />
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script src="js/jquery-1.9.1.js" type="text/javascript"></script>
<script src="js/jquery.mousewheel.js" type="text/javascript"></script>
<script src="js/jquery.ui.core.js" type="text/javascript"></script>
<script src="js/jquery.ui.widget.js" type="text/javascript"></script>
<script src="js/jquery.ui.button.js" type="text/javascript"></script>
<script src="js/jquery.ui.spinner.js" type="text/javascript"></script>
<link href="css/demos.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function () {
function latlong() {
return new google.maps.LatLng($("#lat").val(), $("#lng").val());
}
function position() {
map.setCenter(latlong());
}
$("#lat, #lng").spinner({
step: .001,
change: position,
stop: position
});
var map = new google.maps.Map($("#map")[0], {
zoom: 8,
center: latlong(),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
});
</script>
<style type="text/css">
#map {
width:500px;
height:500px;
}
</style>
</head>
<body>
<label for="lat">緯度</label>
<input id="lat" name="lat" value="44.797"/>
<br>
<label for="lng">經(jīng)度</label>
<input id="lng" name="lng" value="-93.278"/>
<div id="map"></div>
<div class="demo-description">
</div>
</body>
</html>
您可能感興趣的文章:
- jQuery實(shí)現(xiàn)點(diǎn)擊查看大圖并以彈框的形式居中
- 基于jQuery實(shí)現(xiàn)表格的查看修改刪除
- jQuery實(shí)現(xiàn)簡單的圖片查看器
- jquery實(shí)現(xiàn)移動(dòng)端點(diǎn)擊圖片查看大圖特效
- jquery實(shí)現(xiàn)點(diǎn)擊查看更多內(nèi)容控制段落文字展開折疊效果
- jquery實(shí)現(xiàn)鼠標(biāo)滑過小圖查看大圖的方法
- jQuery遍歷頁面所有CheckBox查看是否被選中的方法
- 查看大圖功能代碼jquery版
- JQuery中form驗(yàn)證出錯(cuò)信息的查看方法
- jQuery輸入城市查看地圖使用介紹
- 查看源碼的工具 學(xué)習(xí)jQuery源碼不錯(cuò)的工具
- 基于jQuery實(shí)現(xiàn)的查看全文功能【實(shí)用】
相關(guān)文章
Struts2的s:radio標(biāo)簽使用及用jquery添加change事件
用到Struts2的s:radio標(biāo)簽時(shí)想給它添加一個(gè)change事件,由于此標(biāo)簽為頁面自動(dòng)生成一個(gè)radio組,不可以像正常那樣控制,于是想到用jquery來實(shí)現(xiàn)2013-04-04jquery實(shí)現(xiàn)郵箱自動(dòng)填充提示功能
這篇文章主要介紹了jquery實(shí)現(xiàn)郵箱自動(dòng)填充提示功能,為了提高用戶的體驗(yàn),很多網(wǎng)站都會(huì)實(shí)現(xiàn)郵箱輸入的自動(dòng)提示功能,對(duì)如何實(shí)現(xiàn)自動(dòng)提示功能感興趣的小伙伴們可以參考一下2015-11-11基于jQuery Easyui實(shí)現(xiàn)登陸框界面
本文通過實(shí)例代碼給大家分享了基于jQuery Easyui實(shí)現(xiàn)登陸框界面,代碼簡單易懂,非常不錯(cuò),具有參考借鑒價(jià)值,需要的的朋友參考下吧2017-07-07基于JQuery的一句代碼實(shí)現(xiàn)表格的簡單篩選
JQuery的強(qiáng)大之處,這里就不用講了。這里將用一行簡單的JQuery代碼實(shí)現(xiàn)簡單的表格篩選。2010-07-07jquery實(shí)現(xiàn)鼠標(biāo)經(jīng)過顯示下劃線的漸變下拉菜單效果代碼
這篇文章主要介紹了jquery實(shí)現(xiàn)鼠標(biāo)經(jīng)過顯示下劃線的漸變下拉菜單效果代碼,涉及jquery插件SuperSlide.2.1.js實(shí)現(xiàn)滑動(dòng)切換效果的技巧,非常具有實(shí)用價(jià)值,需要的朋友可以參考下2015-08-08