[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2chのread.cgiへ]
Update time : 07/30 17:56 / Filesize : 220 KB / Number-of Response : 918
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

Google Maps API 質問箱



794 名前:nobodyさん [2008/03/07(金) 17:42:37 ID:Sx/QGO8b]
GLatLngBounds が上手く動作しないのですが、分かる方いらっしゃいませんか

var map = new GMap2(document.getElementById("map"));
var geocoder = new GClientGeocoder();
var one;
var two;

geocoder.getLocations( "港区赤坂5-3-6", function(locations) {
  if (!locations || locations.Status.code != 200) {
    alert(address + " not found");
  } else {
    var place = locations.Placemark[0];
    var point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
    one = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
    map.setCenter(point, 16);
    var marker = new GMarker(point);
    map.addOverlay(marker);
  }
} );
geocoder.getLocations( "港区東新橋1-6-1", function(locations) {
  if (!locations || locations.Status.code != 200) {
    alert(address + " not found");
  } else {
    var place = locations.Placemark[0];
    var point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
    two = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
    var marker = new GMarker(point);
    map.addOverlay(marker);
  }
} );
var gb = new GLatLngBounds( one, two );
map.setCenter( gb.getCenter(), map.getBoundsZoomLevel( gb ) );






[ 続きを読む ] / [ 携帯版 ]

全部読む 前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<220KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef