2006年10月07日
Google Maps API Ver.2対応 @ ウェブ
Google Maps APIの実験をしているezGPSをVer.2対応に書き換えました。暫くVer.1のまま放置していたのですが、Ver.2にしないとハイブリッド表示が出来ないようなので、急遽対応しました。
一応変更箇所をメモしておきます。
■バージョンを変更1
旧(Ver.1)
maps.google.com/maps?file=api&v=1
新(Ver.2)
maps.google.com/maps?file=api&v=2
■バージョンを変更2
旧(Ver.1)
var map = new GMap(document.getElementById("map"));
新(Ver.2)
var map = new GMap2(document.getElementById("map"));
■GPointからGLatLngへ変更。それに伴い経度緯度の順番も変更。
旧(Ver.1)
var point = new GPoint(parseFloat(markers[i].getAttribute("lng")),parseFloat(markers[i].getAttribute("lat")));
新(Ver.2)
var point = new GLatLng(parseFloat(markers[i].getAttribute("lat")),parseFloat(markers[i].getAttribute("lng")));
■センターとズームの設定関数を変更
旧(Ver.1)
map.centerAndZoom(point, 4);
新(Ver.2)
map.setCenter(point, 13,G_HYBRID_MAP);
他にも書き換えた方が良いところがあるのかも知れませんが、取り敢えずこの4点だけで、表示されたので暫く様子見します。
kei3.jp::EzGPS
>>関連リンク
関連日記
- 2007年12月21日 ExcelでGoogle Maps (8772)@ Windows
- 2005年12月07日 Google Maps APIのIEでの問題 (5585)@ ウェブ
- 2007年06月29日 Yahoo! Flash版地図API (5191)@ Flash
- 2008年12月19日 Google Maps APIの制限か? (4383)@ iPod touch
- 2006年07月13日 GPSログのパケット代金 (4214)@ 携帯電話
- 2005年08月22日 Google Maps API 実験 (4212)@ ウェブ
- 2006年01月07日 A5504Tのアドレス帳に経度緯度の座標を登録 (4167)@ 携帯電話
- 2005年12月06日 Google Maps APIの測地系 (3917)@ ウェブ
- 2011年02月16日 Wordpressに外部CSSやJSファイルを読み込む (3477)@ ウェブ
- 2005年11月21日 入門 Ajax/高橋 登史朗 (著) (3417)@ ウェブ
- 2006年04月14日 Google Maps APIを使ったサイト (3177)@ ウェブ
- 2009年07月16日 Google Maps API V3 (3126)@ ウェブ
- 2006年02月23日 Google Maps APIは衛星写真が違う (3116)@ ウェブ
- 2006年04月06日 ALPSLAB slide (3052)@ ウェブ
- 2005年12月14日 Google Maps API 実験ページ更新 (3002)@ ウェブ
- 2006年04月03日 日記の古いページを終了 (2982)@ ウェブ
- 2009年12月11日 WEB+DB PRESS Vol.54 (2955)@ Flash
- 2005年08月10日 Google Maps API (2803)@ ウェブ
- 2005年08月17日 Google Maps API (2733)@ ウェブ
- 2005年09月17日 角島は遠かった (2712)@ 雑
- 2006年09月27日 Google Maps (2711)@ ウェブ
- 2008年12月18日 Google 逆ジオコーディング (2697)@ ウェブ
- 2006年07月05日 Google Mapsが元に戻った? (2694)@ ウェブ
- 2006年04月18日 Google Maps API Version 2 (2671)@ ウェブ
- 2008年06月21日 Google Maps APIを使った場合、誰もがアクセスできないとダメか (2665)@ ウェブ
- 2006年04月11日 マップコミ (2624)@ ウェブ
- 2006年08月04日 GoogleMapsEditor (2604)@ ウェブ
- 2008年05月20日 Google Maps API (2576)@ Flash
- 2008年09月07日 Google Maps API (2568)@ Flash
- 2006年02月10日 AUGM広島のチラシ配布 (2520)@ 広島
アマゾン広告
この日記ページは閲覧数などの条件に応じて、閲覧制限を行っています。他からリンクしていただいても、そのリンクから辿った閲覧者が当ページの内容をご覧頂けない場合があります。ご了承下さい。