Google map 埋め込み js
Google Maps APIキー取得
※Point:async defer
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
</head>
<body>
<style>#map{width:300px;height:200px;}</style>
<div id="map"></div>
<script>
var latV = 35.xxxxxx,
lngV = 139.xxxxxx;
</script>
<script>
function initMap() {
var myLatLng = {lat:latV, lng: lngV};
var map = new google.maps.Map(document.getElementById('map'), {
center: myLatLng,
scrollwheel: true,
zoom: 16
});
var marker = new google.maps.Marker({
map: map,
position: myLatLng,
});
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=APIキー&callback=initMap" async defer></script>
</body>
</html>