我是新手使用地理位置,我的客户提供了一个网址,并要求我显示网址包含的所有内容。网址是:
http://maps.google.co.uk/maps?q=119+5th+Avenue,+New+York,+NY+10003,+USA&hl=en&ll=40.713956,-73.828125&spn=146.915575,14.414062&sll=50.064192,-21.445312&sspn=141.347566,14.414063&oq=119+Fifth+Avenue+New+York+NY+10003+USA+&hnear=119+5th+Ave,+New+York,+10003,+United+States&t=m&z=2
我在网上获得了一个样本工作,并且实现了,这很好。现在我需要更新我下载的函数以上面的url工作,需要显示url(上面)包含的所有位置,我不知道更新到函数
任何人都帮我显示更新我的功能,以显示上面http
包含的所有位置?
我下载的功能:
<script type="text/javascript">
var locations = [
['Bondi Beach', 40.713956, -73.828125, 4],
['Coogee Beach', 146.915575, 14.414062, 5],
['Cronulla Beach', 50.064192, -21.445312, 3],
['Manly Beach', 141.347566, 14.414063, 2]
];
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 11,
center: new google.maps.LatLng(),
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var infowindow = new google.maps.InfoWindow();
var marker, i;
for (i = 0; i < locations.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(locations[i][1], locations[i][2]),
map: map
});
google.maps.event.addListener(marker, 'click', (function(marker, i) {
return function() {
infowindow.setContent(locations[i][0]);
infowindow.open(map, marker);
}
})(marker, i));
}
</script>
提前致谢。如果有人放入小提琴,那就没问题。