Google Maps API

Googleマップもいつのまにか、version 2にアップデートしていた。いままでのものも99%使えるようだが、version 2にアップデートするには、

Given this design, you have two upgrade paths:

* Continue using the same GMap interface without new Version 2 features.
The quickest way to upgrade is to update your Maps API <script> URL to refer to "v=2" instead of "v=1." Since Version 2 preserves the old GMap interface, your site should theroretically continue to work without any further changes. However, in practice, you may have to spend some time debugging. Please see the Incompatibilities section for a list of known incompatibilities between Version 1 and Version 2 of the API, and join the Maps API discussion group if you continue having problems.
* Upgrade to the GMap2 interface to take advantage of Version 2 features.
To take advantage of Version 2 features like tabbed info windows and custom map controls, start using GMap2 instead of GMap. First, update your Maps API <script> URL to refer to "v=2" instead of "v=1." Then, update your code based on our detailed GMap2 upgrade guide below.

  • script要素のsrc属性のURL指定でv=2に変更
  • GMapクラスからGMap2クラスに変更

すればよいようだ。version 2ではメソッドの変更なども若干あるようなのでGMap2を使う場合は該当する部分を変更する必要がありそう。