谷歌地图,国内使用Google Maps JavaScript API,国外业务

时间:2022-07-24 18:59:09

目前还是得墙

<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<title>Simple markers</title>
<style>
html, body {
height: %;
margin: ;
padding: ;
}
#map {
height: %;
}
</style>
</head>
<body>
<div id="map"></div>
<script> function initMap() {
var myLatLng = {lat: -25.363, lng: 131.044}; var map = new google.maps.Map(document.getElementById('map'), {
zoom: ,
center: myLatLng
}); var marker = new google.maps.Marker({
position: myLatLng,
map: map,
title: 'Hello World!'
});
} </script>
<script src="https://maps.google.cn/maps/api/js?v=3.20&region=cn&language=zh-CN&key=your_key&callback=initMap"></script>
</body>
</html>

https://blog.csdn.net/xiaoyu411502/article/details/48784365