Google Maps API 教程


在本文中将学习如何使用谷歌地图API V3创建交互式地图。

现在开始学习 Google Maps API !



什么是 API?

API = 应用程序编程接口(Application programming interface)。

API(Application Programming Interface,应用编程接口)其实就是操作系统留给应用程序的一个调用接口,应用程序通过调用操作系统的 API 而使操作系统去执行应用程序的命令(动作)。

scriptvar map;function initMap() {map = new google.maps.Map(document.getElementById('googleMap'), {center: {lat: -34.397, lng: 150.644},zoom: 8});}/scriptscript src="https://maps.googleapis.com/maps/api/js?key=YourAPIkey&callback=initMap" async defer/script