My Name is Kay....

DIY , 먹방 , 개발 , 육아 , 여행 좋아합니다.
AdBlock 사용시 화면이 정상적으로 노출되지 않습니다.
포스팅 관련 문의 및 개발 문의는 Email : wkzkfmxksi@gmail.com

추가 포스팅이 이뤄지지 않는 블로그입니다. 문의는 wkzkfmxksi@gmail.com 으로 연락주세요.
map
2013.02.06 23:32

구글맵 마커 + 말풍선 - v2

kay
조회 수 10983 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

구글맵 마커 + 말풍선.png

 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <title> Google map </title>
 </head>

 <body onload="onLoad();">
  
<script src="http://maps.google.com/maps?file=api&v=2&hl=en&key=" type="text/javascript"></script>
<script type="text/javascript">

var gmarkers = [];
var htmls = [];

// global "map" variable
var map;

// This function picks up the side_bar click and opens the corresponding info window
function myclick(i) {
  gmarkers[i].openInfoWindowHtml(htmls[i]);
}

// This function zooms in or out
// its not necessary to check for out of range zoom numbers, because the API checks
function myzoom(a) {
  map.setZoom(map.getZoom() + a);
}

function onLoad() {
 if (GBrowserIsCompatible()) {
  // this variable will collect the html which will eventualkly be placed in the side_bar
  var side_bar_html = "";
  var i = 0;

  var baseIcon = new GIcon();
  baseIcon.iconSize=new GSize(15,24);
  baseIcon.shadowSize=new GSize(24,24);
  baseIcon.iconAnchor=new GPoint(0,12);
  baseIcon.infoWindowAnchor=new GPoint(12,0);

  var martini = new GIcon(baseIcon, "http://labs.google.com/ridefinder/images/mm_20_gray.png", null);
  //var martini = new GIcon(baseIcon, "/img/hotel/check.png", null, "/img/hotel/check.png");

  function createMarker(point,html,icon) {
var marker = new GMarker(point,icon);
GEvent.addListener(marker, "click", function() {
  marker.openInfoWindowHtml(html);
});
return marker;
  }
 
  // create the map using the global "map" variable
  map = new GMap2(document.getElementById("map"));
  map.addControl(new GOverviewMapControl());
  map.addControl(new GLargeMapControl());
  map.addControl(new GMapTypeControl());
  map.addControl(new GScaleControl());
  map.enableDoubleClickZoom();
  map.setCenter(new GLatLng(37.55544,127.07590), 15, G_NORMAL_MAP);
  //Map Type : G_NORMAL_MAP, G_SATELLITE_MAP, G_HYBRID_MAP by Ribbie

  // add the points
  var point = new GLatLng(37.55544,127.07590);
  var marker = createMarker(point,"<div align='left' style='font-size:12px;width:300px;'>군자동 주민센터</div>",martini)
  map.addOverlay(marker);
  

}

else {
  alert("Sorry, the Google Maps API is not compatible with this browser");
}
   } // end of onLoad function
 </script>


<div id="map" style="width:450px; height: 300px" ></div> 

 </body>
</html>
?

  1. 구글맵 v3 infoBox

    Date2015.12.29 Categorymap Bykay Views2974
    Read More
  2. 구글맵 v3 단순 다중 마커 (배열이용)

    Date2015.12.28 Categorymap Bykay Views10277
    Read More
  3. 구글맵 마커 + 말풍선 - v3

    Date2015.02.05 Categorymap Bykay Views3281
    Read More
  4. 구글맵 v3 맵상에 보여지는 마커만 생성하기

    Date2014.08.04 Categorymap Bykay Views7603
    Read More
  5. 구글맵 v3 - 마커 + 말풍선 + GPS 연동+ 원그리기 + 동적 마커 생성( Ajax + Json )

    Date2014.07.17 Categorymap Bykay Views16932
    Read More
  6. Google 웹사이트 번역기

    Date2014.04.21 Category기타 Bykay Views5318
    Read More
  7. Google Places API를 이용한 주변 지역 정보 검색

    Date2013.10.18 Categorymap Bykay Views21313
    Read More
  8. GeoRSS 피드에서 KmlLayer를 생성..." geoRSS 로 레이어 마커 찍기 "

    Date2013.08.28 Categorymap Bykay Views5245
    Read More
  9. 구글맵 API 적용범위 (Google Maps API Coverage)

    Date2013.08.27 Categorymap Bykay Views4978
    Read More
  10. google 스트릿뷰 "Street View"

    Date2013.08.27 Categorymap Bykay Views4709
    Read More
  11. 브라우져에서 현재 위경도 읽어와서 구글맵에 마커 표시하기 ( getCurrentPosition + Googlemap marker )

    Date2013.05.31 Categorymap Bykay Views24277
    Read More
  12. 구글맵 출발지 도착지 주소입력해서 길찾기 - v3

    Date2013.05.03 Categorymap Bykay Views29016
    Read More
  13. 모바일 웹 - 위치정보(GPS) + 마커 + 카톡 + 카스 연동

    Date2013.04.24 Categorymap Bykay Views10246
    Read More
  14. 구글맵 아이콘 마커 + 말풍선 + 주소로 위경도 검색 + 거리별 원그리기 - v3

    Date2013.04.22 Categorymap Bykay Views14720
    Read More
  15. geocode - 주소로 위경도 검색 v3

    Date2013.04.21 Categorymap Bykay Views8051
    Read More
  16. 구글맵 마커 + 말풍선 - v2

    Date2013.02.06 Categorymap Bykay Views10983
    Read More
  17. geocode - 구글 맵 위경도 검색 v2

    Date2013.02.06 Categorymap Bykay Views7300
    Read More
  18. 막대 그래프

    Date2013.02.06 CategoryGraph Bykay Views8509
    Read More
  19. 선 + 막대 그래프

    Date2013.02.06 CategoryGraph Bykay Views8666
    Read More
  20. 선 그래프

    Date2013.02.06 CategoryGraph Bykay Views6301
    Read More
Board Pagination Prev 1 Next
/ 1