�Z�����g���Ĉܓx�o�x���擾����(1)

�i���ӁI�j���̋L���́A��API�ł���Google Maps API version 2������������̂ł��Bversion 2�̗��p�͐�������Ă��Ȃ��̂ŁA�Ӑ}�I�ɋ��o�[�W�����̏���T���Ă��Ȃ��ꍇ�́A�V�����o�[�W�����̉���������������B


Google Maps API�ɂ͏Z����񂩂�ܓx�ƌo�x���擾����GClientGeocoder�Ƃ���API������܂��B GClientGeocoder���J�����͓��{�̏Z���ɑΉ����Ă��܂���ł������A2006�N12�����݂ł͎g����悤�ɂȂ��Ă��܂��B �����ł́AGClientGeocoder�̊ȒP�Ȏg����������������Ǝv���܂��B

�Z������͂��Ĉړ�����

�ȉ��̃T���v����Google MAPS API���g�����y�[�W�̃\�[�X�ł��B �������Ă��镔����GClientGeocoder�֘A�ӏ��ł��B ���L�T���v���������ɂ́ukey=aaaaa�v�́uaaaaa�v�����������p��API key������ɕύX���Ă��������B


<!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 JavaScript API Example - simple</title>
    <script src="http://maps.google.com/maps?file=api&v=2&key=aaaaa"
        type="text/javascript" charset="utf-8"></script>
  </head>
  <body onload="load()">
    <div id="map" style="width:450px; height:400px"></div>
    <script type="text/javascript">
    //<![CDATA[


    var map = null;
    var geocoder = null;

    // ������
    // <body onload="load()"> �ŌĂяo����Ă��܂�
    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        map.setCenter(new GLatLng(35.67431, 139.69082), 13);

        // GClientGeocoder��������
        geocoder = new GClientGeocoder();
      }
    }

    // �u�ړ�����v�{�^�����������Ǝ��s����܂�
    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }

    //]]>
    </script>

    <form action="#"
          onsubmit="showAddress(this.address.value); return false">
      <P>
        <input type="text" size="40"
                name="address" value="�a�J��1-1" />
        <input type="submit" value="�ړ�����" />
      </P>
      <div id="map" style="width:500px; height:600px"></div>
    </form>

  </body>

</html>

GClientGeocoder�ɂ�getLatLng�Ƃ������\�b�h������܂��B ���̃��\�b�h�ɏZ�������������ƁA�w�肵��function�Ɉܓx�o�x��񂪓���܂��B

��L�T���v���ł́A�ܓx�o�x�����g���ă}�[�J��n�}�ɒlj�����ƂƂ��ɁAopenInfoWindowHtml���g���ďZ����񕶎����\�����Ă��܂��B ��L�T���v���ł́A������̎擾���@�Ƃ���FORM���g���Ă��܂����A�����Ȃ�getLatLng�Ɂu�a�J��1-1�v�Ƃ�������������Ă����l�ɓ��삵�܂��B

�\����

�\����ł��B


IPv6��b����

YouTube�`�����l������Ă܂��I