-1
即使在LatLng位置的基本標記,我也無法播放,我不確定如何解決它。每當我嘗試放置標記時,整個div標記和地圖都會消失。谷歌地圖,不能放置標記
<div id="googleMap" style="width:100%;height:400px;"></div>
<script>
function myMap() {
var mapProp= {
center:new google.maps.LatLng(-36.934601, 174.915836),
zoom:15,
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Hello World!'
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDRqDMSVnEAKKE7vPz3cWiJ9Ge6lLLBtQ4&callback=myMap"></script>
</div>
你可以添加myLatLng的價值? –