오늘 :
13,608 / 87,188
어제 :
17,828 / 147,980
전체 :
19,971,323 / 274,589,370

Open API 공부

Naver, Daum, Google Open API

추천 수 : 15 / 0
조회 수 : 17808
2007.11.30 (11:21:01)


http://www.subkorea.com/api/google/MapsAPI/event-mouseover.html마우스오버시 사각 도움말 나타남

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Google Maps</title>
    <script src="http://maps.google.com/maps?file=api&v=2&key=abc...xyz" type="text/javascript"></script>
  </head>
  <body onunload="GUnload()">


    <!-- the div where the map will be displayed -->
    <div id="map" style="width: 550px; height: 450px"></div>
    <a href="mouseo.htm">Back to the tutorial page</a>
    
    <!-- fail nicely if the browser has no Javascript -->
    <noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
      However, it seems JavaScript is either disabled or not supported by your browser.
      To view Google Maps, enable JavaScript by changing your browser options, and then
      try again.
    </noscript>




    <script type="text/javascript">
    //<![CDATA[

    if (GBrowserIsCompatible()) {

      function createMarker(point,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });

        // The new marker "mouseover" listener        
        GEvent.addListener(marker,"mouseover", function() {
          marker.openInfoWindowHtml(html);
        });        
        
        return marker;
      }

      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(43.907787,-79.359741), 9);
    
      var point = new GLatLng(43.65654,-79.90138);
      var marker = createMarker(point,'Some stuff to display in the<br>First Info Window <br>With a <a href="http://www.econym.demon.co.uk">Link</a> to my home page')
      map.addOverlay(marker);

      var point = new GLatLng(43.91892,-78.89231);
      var marker = createMarker(point,'Some stuff to display in the<br>Second Info Window')
      map.addOverlay(marker);

      var point = new GLatLng(43.82589,-79.10040);
      var marker = createMarker(point,'Some stuff to display in the<br>Third Info Window')
      map.addOverlay(marker);
    }

    
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }

    // This Javascript is based on code provided by the
    // Blackpool Community Church Javascript Team
    // http://www.commchurch.freeserve.co.uk/  
    // http://econym.googlepages.com/index.htm

    //]]>
    </script>
  </body>

</html>

번호 제목 닉네임 등록일 조회 추천
22 icon-custom 첨부 파일
cyber
2007-11-30 17670 8
21 icon-simple 첨부 파일
cyber
2007-11-30 15874 14
20 marker-drag 첨부 파일
cyber
2007-11-30 17890 8
19 marker-simple 첨부 파일
cyber
2007-11-30 17359 10
18 control-localsearch 첨부 파일
cyber
2007-11-30 21293 4
17 control-custom 첨부 파일
cyber
2007-11-30 17908 11
16 control-positioning 첨부 파일
cyber
2007-11-30 19971 11
15 control-simple 첨부 파일
cyber
2007-11-30 18080 17
Selected event-mouseover 첨부 파일
cyber
2007-11-30 17808 15
13 event-removal 첨부 파일
cyber
2007-11-30 17373 16
Tag List