香港旅游景点分布地图
```html
body {
fontfamily: Arial, sansserif;
margin: 0;
padding: 0;
}
map {
height: 500px;
width: 100%;
}
香港旅游景点分布地图
// Initialize and add the map
function initMap() {
// The location of Hong Kong
const hongKong = { lat: 22.3193, lng: 114.1694 };
// The map, centered at Hong Kong
const map = new google.maps.Map(document.getElementById("map"), {
zoom: 11,
center: hongKong,
});
// Define the array of tourist attractions with their coordinates
const touristAttractions = [
{ name: "Victoria Peak", location: { lat: 22.2750, lng: 114.1466 } },
{ name: "Victoria Harbour", location: { lat: 22.2910, lng: 114.1685 } },
{ name: "Tsim Sha Tsui", location: { lat: 22.2989, lng: 114.1726 } },
{ name: "Lantau Island", location: { lat: 22.2660, lng: 113.9418 } },
{ name: "Ngong Ping 360", location: { lat: 22.2569, lng: 113.9014 } },
{ name: "Ocean Park Hong Kong", location: { lat: 22.2464, lng: 114.1751 } },
{ name: "Hong Kong Disneyland", location: { lat: 22.3163, lng: 114.0452 } },
{ name: "Wong Tai Sin Temple", location: { lat: 22.3420, lng: 114.1933 } },
{ name: "Big Buddha (Tian Tan Buddha)", location: { lat: 22.2535, lng: 113.9000 } },
{ name: "Hong Kong Museum of History", location: { lat: 22.3020, lng: 114.1798 } },
{ name: "Ladies' Market", location: { lat: 22.3224, lng: 114.1684 } },
{ name: "Stanley Market", location: { lat: 22.2195, lng: 114.2165 } },
{ name: "Avenue of Stars", location: { lat: 22.2948, lng: 114.1731 } }
];
// Loop through the array and add markers for each location
touristAttractions.forEach((attraction) => {
const marker = new google.maps.Marker({
position: attraction.location,
map: map,
title: attraction.name,
});
});
}