教程
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
本部分列出了几个教程,帮助您轻松上手使用 Maps JavaScript API。
只使用 HTML 就可以向网页添加带有标记的地图。
以程序化方式向网页添加带有标记的地图。
使用浏览器的 HTML5 地理定位功能以及 Maps JavaScript API 在 Google 地图上获取设备的地理位置。
使用标记聚类在地图上显示大量标记。
使用自定义图形图标创建标记。
向地图添加自定义图例。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-27。
[null,null,["最后更新时间 (UTC):2025-08-27。"],[[["\u003cp\u003eThis section provides tutorials on basic Google Maps JavaScript API implementations, such as adding maps and markers using HTML or JavaScript.\u003c/p\u003e\n"],["\u003cp\u003eLearn to display a user's location, manage a large number of markers through clustering, and personalize the map with custom markers and legends.\u003c/p\u003e\n"],["\u003cp\u003eExplore advanced features like creating interactive heatmaps using Firebase for real-time collaborative mapping experiences.\u003c/p\u003e\n"]]],[],null,["# Tutorials\n\nThis section features several tutorials to get you up and running with\nMaps JavaScript API.\n\n### [Add a Google map with a marker using HTML](/maps/documentation/javascript/add-google-map-wc-tut)\n\nAdd a map with a marker to a web page using only HTML.\n\n### [Add a Google Map with a marker using JavaScript](/maps/documentation/javascript/adding-a-google-map)\n\nAdd a map with a marker to a web page programmatically.\n\n### [Show current location](/maps/documentation/javascript/geolocation)\n\nGet the geographic location of a device on a Google map, using your\nbrowser's HTML5 Geolocation feature along with Maps JavaScript API.\n\n### [Cluster markers](/maps/documentation/javascript/marker-clustering)\n\nUse marker clustering to display a large number of markers on a map.\n\n### [Custom markers](/maps/documentation/javascript/custom-markers)\n\nCreate markers using custom graphic icons.\n\n### [Custom legends](/maps/documentation/javascript/adding-a-legend)\n\nAdd a custom legend to your maps."]]