오늘 :
1,154 / 9,273
어제 :
3,548 / 100,494
전체 :
7,618,393 / 242,366,327

Open API 공부

Naver, Daum, Google Open API

추천 수 : 15 / 0
조회 수 : 16656
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 16501 8
21 icon-simple 첨부 파일
cyber
2007-11-30 14724 14
20 marker-drag 첨부 파일
cyber
2007-11-30 16620 8
19 marker-simple 첨부 파일
cyber
2007-11-30 16197 10
18 control-localsearch 첨부 파일
cyber
2007-11-30 19941 4
17 control-custom 첨부 파일
cyber
2007-11-30 16631 11
16 control-positioning 첨부 파일
cyber
2007-11-30 18873 11
15 control-simple 첨부 파일
cyber
2007-11-30 17044 17
Selected event-mouseover 첨부 파일
cyber
2007-11-30 16656 15
13 event-removal 첨부 파일
cyber
2007-11-30 16276 16
Tag List