FrontEnd
구글 지도
xeant
조회 수 : 48
2024.02.26 13:37
: 0
<div id="board_map_canvas" style="width:100%; height:500px; "></div> <div style="margin-top:5px; "> <span style="color:#797979" >주소 : 울산광역시 남구 삼산동 170-11번지 </span> </div> <script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false&language=ko"></script> <script> function initialize() { var firstLatLng = new google.maps.LatLng(35.54314966834098, 129.35204816484452); var mapDiv = document.getElementById('board_map_canvas'); var myOptions = { zoom: 15, center: firstLatLng, mapTypeId: google.maps.MapTypeId.ROADMAP, zoomControl : true, streetViewControl : true } var map = new google.maps.Map(mapDiv, myOptions); var centericon = new google.maps.Marker({ position : firstLatLng, map:map, zoom:7 }); var str = "<div style='margin-top:10px;margin-left:20px;width:300px;'><table style='width:100%'><tr><td rowspan='3'><img src='http://www.ecowin.kr/img/logo.png' /></td><td><span style='font-weight:bold;font-size:13px;margin-left:5px;'>"+ "에코윈" +"</span></td></tr><tr><td><span style='margin:10px 0px 0px 10px; font-size:11px;'>'울산시 남구 삼산동 170-11번지 '</span></td></tr><tr><td><span style='font-size:14px; font-weight:bold;color:#629FE8;'>TEL : 052-273-3204</span></td></tr></table></div>"; var infowindow = new google.maps.InfoWindow({ content:str }); infowindow.open(map, centericon); google.maps.event.addListener(centericon, 'click', function(){ infowindow.open(map, centericon); }); } window.onload = initialize(); </script>