googletoolbarButtonsGoogleのサービスは日増しに種類を増して、もはやGoogleなしでは仕事もままならない気がしてきています。
そんな中でもGoogleMapは自分としては利用頻度が高いサービスなんですが、この間、GoogleToolBarにこのGoogleMapを一発で表示できるボタンがあることに気付いてダウンロードしました。図の一番右のボタンをクリックすると、新しいボタンが追加できるんですね。

で、GppgleMapを追加したんですが・・・表示されるのはアメリカの地図じゃありませんか。しかも、日本が選べません

しばらく追加したまま使わずに放置していたんですが、何かしゃくだったのでToolBarButtonのスクリプトを変更して、日本語版GoogleMapが表示できるように取りあえず改変しました。最も、めちゃ簡単な改変なんでブログにアップするのも何だかなぁってかんじなんですが

オリジナルのコード

  1.  <?xml version="1.0"?>
  2.  <custombuttons xmlns="http://toolbar.google.com/custombuttons/">
  3.    <button>
  4.      <site>http://maps.google.com/?hl={option1}</site>
  5.      <option>
  6.        <title>Language code</title>
  7.        <description>Enter your language code (eg. EN for English, DE for German, IT for Italian, ES for Spanish, FR for French)</description>
  8.        <default>EN</default>
  9.      </option>
  10.      <title>Google Maps</title>
  11.      <description>Search Google Maps</description>
  12.      <description locale="de">Suchen in Google Maps</description>
  13.      <description locale="it">Cerca nella Google Maps</description>
  14.      <description locale="fr">Rechercher en Google Maps</description>
  15.      <description locale="es">Buscar en Google Maps</description>
  16.      <search>http://maps.google.com/maps?hl={option1}&amp;f=q&amp;q={query}</search>
  17.      <send>http://maps.google.com/maps?hl={option1}&amp;f=q&amp;q={selection}</send>
  18.      <icon>
  19.  AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAA
  20.  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADA0crQ4PIb0AAAACAAAAAAAAAAAAAAAA
  21.  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACh8hSNUlKVfqAAAAEQAAAAAA
  22.  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACc1O374PkWS/wAA
  23.  AD0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwUVq4
  24.  /1tm0f8CAgaIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL
  25.  EhQrz2l19v9uev//Gh093wAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  26.  AAAAAAAAbkNLnP9xfv//cX3//0tTrf8AAAB8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  27.  AAAAAAAAAAAAOSMnUe5uev3/bHj//2x4//9wfP//JytZ8gAAAD8AAAAAAAAAAAAAAAAAAAAAAAAA
  28.  AAAAAAAAAAAAAAAAIBgbOeBncuv/bnv//2t4//9reP//bnr//2dz7v8aHT7jAAAAJAAAAAAAAAAA
  29.  AAAAAAAAAAAAAAAAAAAAKAUFDKBbZc//cX7//215//9rd/7/a3f+/215//9wff//XWfU/wYHD6cA
  30.  AAAtAAAAAAAAAAAAAAAAAAAAAAAAAHQhJEzocn7//257//9YYtL/Gh0+/xodPv9YYtL/bnr//3J/
  31.  //8jJ1LqAAAAeAAAAAAAAAAAAAAAAAAAAAAEBAiUMTZu+HOA//9yfv//Mjh4/wAAAP8AAAD/Mjh4
  32.  /3J+//9zgP//NDp19wUFDJMAAAAAAAAAAAAAAAAAAAAAAAAAhCgtXPByf///cHz//0hQrP8CAgT/
  33.  AgIE/0hQrP9wfP//c4D//yswYvEAAAGHAAAAAAAAAAAAAAAAAAAAAAAAAEMNDh/CaHPp/297//9r
  34.  d/7/WmPU/1pj1P9rd/7/b3v//2p27P8PECPIAAAASgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARy0y
  35.  aftyfv//cX7//3B9//9wff//cX7//3J///8wNW/9AAAATQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  36.  AAAAAAAAAABjJSlX9Vhizv9odPT/aHT1/1hiz/8mKlr3AAAAaAAAAAAAAAAAAAAAAAAAAAAAAAAA
  37.  AAAAAAAAAAAAAAAAAAAAAAAAADIDAwaaEBImwxASJ8MDAwedAAAANQAAAAAAAAAAAAAAAAAAAAAA
  38.  AAAA/n/pEv5/xuz+f6Pz/j+QBvw/9AT8Pyzg+B90+PAPC6LgB5II4Ae1N8ADDnLAA0bM4Ad+9vAP
  39.  7VX4H8pX/D9sCA==
  40.      </icon>
  41.      <update>http://koenigstein.googlepages.com/gb_maps.xml</update>
  42.    </button>
  43.  </custombuttons>

カスタムしたコード

  1.  <?xml version="1.0"?>
  2.  <custombuttons xmlns="http://toolbar.google.com/custombuttons/">
  3.    <button>
  4.      <site>http://maps.google.co.jp/?hl={option1}</site>
  5.      <option>
  6.        <title>Language code</title>
  7.        <description>Enter your language code (ja for Japan, eg. EN for English, DE for German, IT for Italian, ES for Spanish, FR for French)</description>
  8.        <default>ja</default>
  9.      </option>
  10.      <title>Google Maps</title>
  11.      <description>Search Google Maps</description>
  12.      <description locale="de">Suchen in Google Maps</description>
  13.      <description locale="it">Cerca nella Google Maps</description>
  14.      <description locale="fr">Rechercher en Google Maps</description>
  15.      <description locale="es">Buscar en Google Maps</description>
  16.      <search>http://maps.google.co.jp/maps?hl={option1}&amp;f=q&amp;q={query}</search>
  17.      <send>http://maps.google.co.jp/maps?hl={option1}&amp;f=q&amp;q={selection}</send>
  18.      <icon>
  19.  AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAA
  20.  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADA0crQ4PIb0AAAACAAAAAAAAAAAAAAAA
  21.  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACh8hSNUlKVfqAAAAEQAAAAAA
  22.  AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACc1O374PkWS/wAA
  23.  AD0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwUVq4
  24.  /1tm0f8CAgaIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAL
  25.  EhQrz2l19v9uev//Gh093wAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  26.  AAAAAAAAbkNLnP9xfv//cX3//0tTrf8AAAB8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  27.  AAAAAAAAAAAAOSMnUe5uev3/bHj//2x4//9wfP//JytZ8gAAAD8AAAAAAAAAAAAAAAAAAAAAAAAA
  28.  AAAAAAAAAAAAAAAAIBgbOeBncuv/bnv//2t4//9reP//bnr//2dz7v8aHT7jAAAAJAAAAAAAAAAA
  29.  AAAAAAAAAAAAAAAAAAAAKAUFDKBbZc//cX7//215//9rd/7/a3f+/215//9wff//XWfU/wYHD6cA
  30.  AAAtAAAAAAAAAAAAAAAAAAAAAAAAAHQhJEzocn7//257//9YYtL/Gh0+/xodPv9YYtL/bnr//3J/
  31.  //8jJ1LqAAAAeAAAAAAAAAAAAAAAAAAAAAAEBAiUMTZu+HOA//9yfv//Mjh4/wAAAP8AAAD/Mjh4
  32.  /3J+//9zgP//NDp19wUFDJMAAAAAAAAAAAAAAAAAAAAAAAAAhCgtXPByf///cHz//0hQrP8CAgT/
  33.  AgIE/0hQrP9wfP//c4D//yswYvEAAAGHAAAAAAAAAAAAAAAAAAAAAAAAAEMNDh/CaHPp/297//9r
  34.  d/7/WmPU/1pj1P9rd/7/b3v//2p27P8PECPIAAAASgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARy0y
  35.  aftyfv//cX7//3B9//9wff//cX7//3J///8wNW/9AAAATQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
  36.  AAAAAAAAAABjJSlX9Vhizv9odPT/aHT1/1hiz/8mKlr3AAAAaAAAAAAAAAAAAAAAAAAAAAAAAAAA
  37.  AAAAAAAAAAAAAAAAAAAAAAAAADIDAwaaEBImwxASJ8MDAwedAAAANQAAAAAAAAAAAAAAAAAAAAAA
  38.  AAAA/n/pEv5/xuz+f6Pz/j+QBvw/9AT8Pyzg+B90+PAPC6LgB5II4Ae1N8ADDnLAA0bM4Ad+9vAP
  39.  7VX4H8pX/D9sCA==
  40.      </icon>
  41.      <update>http://koenigstein.googlepages.com/gb_maps.xml</update>
  42.    </button>
  43.  </custombuttons>

4行目を日本のGoogleMapのURLに変更しています。7行目と8行目に日本用のそれらしい記述を追加したり書き換えたりしています。でも、あんまり関係ないですね。
16,17行目をやはり日本のGoogleMapのURLに変更です。たいしたことはしてません・・・
これでボタンをクリックすると日本の地図が標準で開くようになりました

2007/09/26 追記
日本向けの「Googleマップ」ボタンがちゃんと提供されてることに今朝気づいた・・・ そそっかしいな>自分