// JavaScript Document
    //<![CDATA[
    
    // TextualZoomControl 是一种 GControl 控件，可以显示文本＂放大＂和＂缩小＂按钮。
    // （取代Google 地图上对应的图标按钮）

    function TextualZoomControl() {
    }
    TextualZoomControl.prototype = new GControl();

    // 为每个按钮创建一个 DIV，并将其放在容器 DIV 中，
    // 然后返回容器 DIV 作为我们的控件元素。将该控件添加到
    // 地图容器中，并将其返回，以便地图类能正确地放置它。
    TextualZoomControl.prototype.initialize = function(map) {
      var container = document.createElement("div");

      var zoomInDiv = document.createElement("div");
      this.setButtonStyle_(zoomInDiv);
      container.appendChild(zoomInDiv);
      zoomInDiv.appendChild(document.createTextNode("放大"));
      GEvent.addDomListener(zoomInDiv, "click", function() {
        map.zoomIn();
      });

      var zoomOutDiv = document.createElement("div");
      this.setButtonStyle_(zoomOutDiv);
      container.appendChild(zoomOutDiv);
      zoomOutDiv.appendChild(document.createTextNode("缩小"));
      GEvent.addDomListener(zoomOutDiv, "click", function() {
        map.zoomOut();
      });

      map.getContainer().appendChild(container);
      return container;
    }

    // 默认情况下，该控件将在地图的左上角显示，边距为 7 像素。
    TextualZoomControl.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7));
    }

    // 设置给定按钮元素的正确 CSS。
    TextualZoomControl.prototype.setButtonStyle_ = function(button) {
      button.style.textDecoration = "underline";
      button.style.color = "#0000cc";
      button.style.backgroundColor = "white";
      button.style.font = "small Arial";
      button.style.border = "1px solid black";
      button.style.padding = "2px";
      button.style.marginBottom = "3px";
      button.style.textAlign = "center";
      button.style.width = "6em";
      button.style.cursor = "pointer";
    }    
    function initialize(lat,lng,info) {
      if (GBrowserIsCompatible()) {

        var map = new GMap2(document.getElementById("map"));

        map.addControl(new TextualZoomControl());
        var smallMapControl = new GLargeMapControl();
        var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10,10));
        map.addControl(smallMapControl, topRight);
        map.addControl(new GScaleControl(),topRight);
        GEvent.addListener(map, "dblclick", function() {var center = map.getCenter(); alert(center.lat()+" and "+center.lng()); });        
        if ("nj"==info){map.openInfoWindow(new GLatLng(32.027, 118.796),document.createTextNode("MyYork"));}
        map.setCenter(new GLatLng(lat,lng), 14);//南京32.041, 118.784；咸阳34.336,108.704；乾县34.526,108.252；西安34.259,108.947        
        //google.load("search", "1");        
        //var searchControl = new google.search.SearchControl();
        //searchControl.addSearcher(new google.search.WebSearch());
        //searchControl.addSearcher(new google.search.NewsSearch());        
      }
    }    
    //]]>