다음은 완전한 예입니다. 기본적으로, map.setCenter 명령을 사용하면 다른
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Demo</title>
<script src="http://maps.google.com/maps/api/js?sensor=false"
type="text/javascript"></script>
</head>
<body>
<div>
<a href="#" onclick="map.setCenter(a);">Point A</a>
<a href="#" onclick="map.setCenter(b);">Point B</a>
<a href="#" onclick="map.setCenter(c);">Point C</a>
</div>
<div id="map" style="width: 640px; height: 480px;"></div>
<script type="text/javascript">
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 9,
center: new google.maps.LatLng(40.00, -104.00),
mapTypeId: google.maps.MapTypeId.TERRAIN
});
var a = new google.maps.LatLng(40.00, -104.00);
var b = new google.maps.LatLng(41.00, -105.00);
var c = new google.maps.LatLng(39.00, -103.00);
new google.maps.Marker({
position: a,
map: map
});
new google.maps.Marker({
position: b,
map: map
});
new google.maps.Marker({
position: c,
map: map
});
</script>
</body>
</html>
에 한 지점에서 이동할 수 있습니다 그래서 이것은 내가지도를 구글에서 내 위치에 저장되어있는 경우, 그에 저장 포인트가, 하나 개의 질문하지만, 중대하다 약간의 광고 문구가 있으면 액세스 할 수 있습니까? 아니면이 예제 에서처럼 해당 좌표를 넣으면 단순히이를 끌어 올리는 것입니까? – loriensleafs
원래 웹 사이트에서 내 장소지도를 표시하려면 몇 가지 추가 단계를 거쳐야합니다 (원래 질문에서하고 싶은 말). 이러한 단계에는지도를 KML로 내보내고, 서버에서 KML 파일을 호스팅하고, 누군가가 귀하의 사이트를 방문 할 때 KML 파일을지도 레이어로로드하는 작업이 포함됩니다. 사용자 정의 정보창을 사용하여 원하는 텍스트를 쉽게 표시 할 수 있습니다. 자세한 정보는 https://developers.google.com/maps/documentation/javascript/overlays#InfoWindows – javram
입니다. 저장된지도에 대한 액세스 권한을 얻을 수 없으므로 안심할 수 있습니다. 그러나 좋은 점을 알고 계시다면, 그 링크를 이용해 주셔서 감사합니다. 맞춤 인터페이스를 해드 리겠습니다. 감사합니다. 정말 고맙습니다. – loriensleafs