基于jquery實(shí)現(xiàn)控制經(jīng)緯度顯示地圖與衛(wèi)星
<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>
相關(guān)文章
JQuery的Pager分頁器實(shí)現(xiàn)代碼
這篇文章主要為大家詳細(xì)介紹了JQuery的Pager分頁器實(shí)現(xiàn)代碼,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2016-05-05jQuery創(chuàng)建DOM元素實(shí)例解析
這篇文章主要介紹了jQuery創(chuàng)建DOM元素的方法,實(shí)例分析了jQuery使用$直接創(chuàng)建DOM元素的技巧,具有一定參考借鑒價(jià)值,需要的朋友可以參考下2015-01-01淺析jQuery Ajax請(qǐng)求參數(shù)和返回?cái)?shù)據(jù)的處理
這篇文章主要介紹了淺析jQuery Ajax請(qǐng)求參數(shù)和返回?cái)?shù)據(jù)的處理的相關(guān)資料,需要的朋友可以參考下2016-02-02jQuery實(shí)現(xiàn)百度登錄框的動(dòng)態(tài)切換效果
這篇文章主要介紹了jQuery實(shí)現(xiàn)百度登錄框的動(dòng)態(tài)切換效果,需要的朋友可以參考下2017-04-04jQuery prototype沖突的2種解決方法(附demo示例下載)
這篇文章主要介紹了jQuery prototype沖突的2種解決方法,分析了針對(duì)jQuery中添加代碼與沖突位置添加代碼2種情況,并附帶demo示例供讀者下載參考,需要的朋友可以參考下2016-01-01jQuery 擴(kuò)展對(duì)input的一些操作方法
擴(kuò)展對(duì)input的一些方法(練習(xí)jQuery插件)2009-10-10DOM操作和jQuery實(shí)現(xiàn)選項(xiàng)移動(dòng)操作的簡單實(shí)例
下面小編就為大家?guī)硪黄狣OM操作和jQuery實(shí)現(xiàn)選項(xiàng)移動(dòng)操作的簡單實(shí)例。小編覺得挺不錯(cuò)的,現(xiàn)在就分享給大家,也給大家做個(gè)參考。一起跟隨小編過來看看吧2016-06-06Javascript中的異步編程規(guī)范Promises/A詳細(xì)介紹
這篇文章主要介紹了Javascript中的異步編程規(guī)范Promises/A詳細(xì)介紹,同時(shí)介紹了jQuery 中的 Deferred 和 Promises,需要的朋友可以參考下2014-06-06為jquery的ajaxfileupload增加附加參數(shù)的方法
這篇文章主要介紹了為jquery的ajaxfileupload增加附加參數(shù)的方法,需要的朋友可以參考下2014-03-03