• 북마크
  • 1:1문의
  • 새글
  • 회원가입
  • 로그인

자유게시판

  • Home
  • 커뮤니티
  • 자유게시판

이윰빌더 list 배열을 자바스크립트에 보여주려면 어떻게하나요??

2,474 2015.12.23 22:51

짧은주소

본문

<script type="text/javascript" src="http://maps.google.com/maps/api/js?v=3.exp&sensor=false&language=ko&region=kr"></script>
<script type="text/javascript">
 function mgminfomap(){
  var myOptions = {
   zoom: 3,
        //center: new google.maps.LatLng(27.3114655, 90.94384680000007),
       mapTypeId: google.maps.MapTypeId.ROADMAP
  }
     var map = new google.maps.Map(document.getElementById('mgmap'), myOptions);  

  var locations = [
   <? for ($i=0; $i<count($list); $i++) {
    $name1=strip_tags($list[$i][subject]);
    $lat=($list[$i][wr_3]);
    $lng=($list[$i][wr_4]);
    $address=strip_tags($list[$i][wr_2]);
    $mapnum=($list[$i][wr_id]);
    $mtem="<table><tr><td colspan=2 width=300><a href={$list[$i][href]}><h3>$name1</h3></a></td></tr><tr><td width=70>주소: </td><td width=230>{$address}</td></tr></table>";
   ?>
   ['<?=$mtem?>', '<?=$lat?>', '<?=$lng?>', '<?=$mapnum?>']
    <? if ($i==count($list)-1) continue; ?>
    ,
   <? } ?>
  ];
    
     var infowindow = new google.maps.InfoWindow();
     var marker, i;  
  var bounds = new google.maps.LatLngBounds();
 

     for (i = 0; i < locations.length; i++) {
   var myLatLng = new google.maps.LatLng(locations[i][1], locations[i][2]);
        var marker = new google.maps.Marker({
          position: myLatLng,
          map: map
   });
   
   bounds.extend(myLatLng);

        google.maps.event.addListener(marker, 'click', (function(marker, i) {
          return function() {
     infowindow.setContent(locations[i][0]);
             infowindow.open(map, marker);
          }
        })(marker, i));
     
  }
  
  zoomChangeBoundsListener = google.maps.event.addListener(map, "bounds_changed",function(event){
if(this.getZoom() > 20)
this.setZoom(16);
google.maps.event.removeListener(zoomChangeBoundsListener);
});

  map.fitBounds(bounds); 
 }
 google.maps.event.addDomListener(window, 'load', mgminfomap);
  </script>
<!--지도 끝 -->

 

 

>> 해당소스에서 $list 배열을 도무지 못하겠네요..

0
좋아요!
2
- 지스타온 메일보내기 아이디로 검색 - 회원등급 : 씨앗/Level 4 - 포인트 : 1,049
레벨 4
경험치 1,356

Progress Bar 20%

- 가입일 : 2015-04-11 00:45:36
- 서명 :
- 자기소개 :
댓글목록

등록된 댓글이 없습니다.

Total 725건 1 페이지
번호 제목 글쓴이 날짜 추천
725 부끄럼소년 아이디로 검색 2017.07.31 1,092 0
724 닭발은세개 아이디로 검색 2017.07.26 1,288 0
723 오피 아이디로 검색 2017.07.18 997 0
722 오피 아이디로 검색 2017.07.14 1,259 0
721 이현민 아이디로 검색 2017.07.11 863 0
720 이현민 아이디로 검색 2017.07.06 902 0
719 오피 아이디로 검색 2017.06.09 1,957 0
718 서종득 아이디로 검색 2017.05.31 692 1
717 JMEE 아이디로 검색 2017.05.17 881 0
716 크롱크롱 아이디로 검색 2017.05.07 1,893 0
715 개발이조아 아이디로 검색 2017.05.03 1,575 0
714 플라잉피그 아이디로 검색 2017.04.29 1,282 0
713 에클레시아선교회 아이디로 검색 2017.04.12 5 0
712 비케잉 아이디로 검색 2017.04.11 801 0
711 비즈차이나 아이디로 검색 2017.04.07 1,184 0
710 비즈차이나 아이디로 검색 2017.04.07 1,117 0
709 달달하고달콤한 아이디로 검색 2017.04.03 1,075 0
708 달달하고달콤한 아이디로 검색 2017.03.29 987 0
707 멍청한참새 아이디로 검색 2017.03.21 1,144 0
706 캬릉냥이 아이디로 검색 2017.02.21 5,347 0
LOGIN
사이드 메뉴

최신글이 없습니다.

최신글이 없습니다.

출석 랭킹

오늘의 랭킹

회원사진

닉네임

개근왕

최다1위

shadow shadow
Ranking

    출력할 랭킹이 없습니다.

  • 01 shadow
    674,374
  • 02 신비
    335,419
  • 03 가을하늘
    204,735
  • 04 mame
    202,630
  • 05 이윰MOUNT
    199,181
  • 06 미스코리아
    163,939
  • 07 레오나르도
    147,576
  • 08 테크니션
    142,655
  • 09 이윰IN
    135,258
  • 10 비온뒤맑음
    127,882
  • 01 shadow
    28,938
  • 02 joosam
    23,606
  • 03 티보리
    21,954
  • 04 홍인
    18,644
  • 05 레오나르도
    18,088
  • 06 이윰IN
    17,983
  • 07 도깨비
    16,614
  • 08 이윰EGG
    16,105
  • 09 자이언트
    14,698
  • 10 미스트
    14,379