0
我嘗試過多種變化,但沒有在地圖上顯示標記。任何人都可以幫忙嗎?無法在Google地圖上添加標記Api
</script>
<script>
function initialize() {
var latlng = new google.maps.LatLng(51.51697, -0.14650);
var myOptions = {
zoom: 16,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
}
// To add the marker to the map, use the 'map' property
var marker = new google.maps.Marker({
position: new google.maps.LatLng(51.51697, -0.14650),
map: map,
title:"HERE"
});
// To add the marker to the map, call setMap();
marker.setMap(map);
</script>
非常感謝。