我有这段代码
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script>
$(document).ready(function () {
// Define the latitude and longitude positions
var latitude = parseFloat("00.000000");
var longitude = parseFloat("00.000000");
var latlngPos = new google.maps.LatLng(latitude, longitude);
// Set up options for the Google map
var myOptions = {
zoom: 10,
center: latlngPos,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
// Define the map
map = new google.maps.Map(document.getElementById("map"), myOptions);
// Add the marker
var marker = new google.maps.Marker({
position: latlngPos,
draggable: true,
map: map,
title: "PC Pro Offices"
});
});
</script>
如何在标记纬度和经度被拖动并将其放入一个或两个字段后获取标记纬度和经度。