오늘 :
9,430 / 58,229
어제 :
18,556 / 211,600
전체 :
20,201,719 / 276,725,122

Open API 공부

Naver, Daum, Google Open API

cyber
추천 수 : 20 / 0
조회 수 : 17858
2007.11.30 (12:33:29)


http://www.subkorea.com/api/google/MapsAPI/mapsrc/icon-geicons/index.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" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <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()">


    <div id="map" style="width: 550px; height: 450px"></div>
    <a href="geicons.htm">Back to the tutorial page</a>


    <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()) {
    
      var baseIcon = new GIcon();
          baseIcon.iconSize=new GSize(32,32);
          baseIcon.shadowSize=new GSize(56,32);
          baseIcon.iconAnchor=new GPoint(16,32);
          baseIcon.infoWindowAnchor=new GPoint(16,0);
          
      var martini = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon27.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon27s.png");
      var plane   = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon56.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon56s.png");
      var pushpin = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal5/icon14.png", null, "http://maps.google.com/mapfiles/kml/pal5/icon14s.png");
  

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

      // Display the map, with some controls and set the initial location
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.addControl(new GMapTypeControl());
      map.setCenter(new GLatLng(43.907787,-79.359741),8);
    
      // Set up three markers with info windows
    
      var point = new GLatLng(43.65654,-79.90138);
      var marker = createMarker(point,'<div style="width:240px">Some stuff to display in the First Info Window. With a <a href="http://www.econym.demon.co.uk">Link</a> to my home page</div>', martini)
      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', plane)
      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', pushpin)
      map.addOverlay(marker);

    }
    
    // display a warning if the browser was not compatible
    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>

번호 제목 닉네임 등록일 조회 추천
52 trafficOverlay 첨부 파일
cyber
2007-11-30 29171 33
51 map-range 첨부 파일
cyber
2007-11-30 18811 27
50 directions-advanced 첨부 파일
cyber
2007-11-30 28404 23
49 marker-textfiles 첨부 파일
cyber
2007-11-30 19068 23
48 geocoding-cache 첨부 파일
cyber
2007-11-30 26606 21
47 marker-scroll 첨부 파일
cyber
2007-12-03 28321 20
46 marker-manager 첨부 파일
cyber
2007-11-30 17731 20
Selected icon-geicons 첨부 파일
cyber
2007-11-30 17858 20
44 event-bind 첨부 파일
cyber
2007-11-30 19846 19
43 event-simple 첨부 파일
cyber
2007-11-30 19480 19
Tag List