구글 맵 강의

구글 맵 API

이 튜토리얼은 구글 맵을 설명합니다 APIApplication Programming Interface, 애플리케이션 프로그래밍 인터페이스)。

API는 소프트웨어 애플리케이션을 구축할 수 있는 메서드와 도구 집합입니다.

HTML 구글 맵

이 예제는 HTML에서 구글 맵을 생성합니다:

예제

<!DOCTYPE html>
<html>
<body>
<h1>내 첫 번째 구글 맵</h1>
<div id="googleMap" style="width:100%;height:400px;"></div>
<script>
function myMap() {
var mapProp= {
  center:new google.maps.LatLng(51.508742,-0.120850),
  zoom:5,
};
var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
}
</script>
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&callback=myMap"></script>
</body>
</html>