復制代碼 代碼如下:
<link rel=stylesheet type=text/css />
<link rel=stylesheet type=text/css />
<script src= type=text/javascript></script>
<script src=js/jqueryjs type=text/javascript></script>
<script src=js/jquerymousewheeljs type=text/javascript></script>
<script src=js/rejs type=text/javascript></script>
<script src=js/jqueryuiwidgetjs type=text/javascript></script>
<script src=js/jqueryuibuttonjs type=text/javascript></script>
<script src=js/jqueryuispinnerjs type=text/javascript></script>
<link rel=stylesheet type=text/css />
<script type=text/javascript>
$(function () {
function latlong() {
return new googlemapsLatLng($(#lat)val() $(#lng)val());
}
function position() {
mapsetCenter(latlong());
}
$(#lat #lng)spinner({
step:
change: position
stop: position
});
var map = new googlemapsMap($(#map)[] {
zoom:
center: latlong()
mapTypeId: googlemapsMapTypeIdROADMAP
});
});
</script>
<style type=text/css>
#map {
width:px;
height:px;
}
</style>
</head>
<body>
<label for=lat>緯度</label>
<input id=lat name=lat value=/>
<br>
<label for=lng>經度</label>
<input id=lng name=lng value=/>
<div id=map></div>
<div class=demodescription>
</div>
From:http://tw.wingwit.com/Article/program/Java/Javascript/201401/30277.html