2012-03-16 18 views
0

現在、Googleシステムは指定された場所のエリアからリストを返します。だから私は郵便番号を入力すると、それは境界を使用し、ローカルリストをもたらす。これは正常に動作します。Google Maps API - 一致するすべての場所の結果を取得

しかし、「Newcastle」を検索すると、Lymeの下のNewcastleではなく、Newcastle Tynesideがデフォルトになります。

地図APIに「デフォルト」とはみなされず、すべての場所からリストを戻すように指示する方法はありますか?

var address = "<?php echo $_GET['place']." UK";?>"; 
///set map center position and place marker 
geocoder.geocode({ 'address': address}, function(results, status) { 
///set center position 
map.setCenter(results[0].geometry.location); 
circ = new google.maps.Circle(); 
circ.setCenter(results[0].geometry.location); 
circ.setRadius(miles * 1609.0); 
map.fitBounds(circ.getBounds()); 
circ.setMap(map); 

// Set co-ordinates of address 
var addresslong = results[0].geometry.location.lat(); 
var addresslat = results[0].geometry.location.lng(); 
var addresslatlng = new google.maps.LatLng(addresslong, addresslat);   
placeMarkers(addresslatlng); 

すべてのヘルプやアドバイスをいただければ幸いです。

以下は、私が住所をジオコードするために使用している基本的なスクリプトです。

答えて

0

はい、結果オブジェクトは複数の場所を返します。結果のすべてのオブジェクトを繰り返します。

+0

私はあなたが何を意味するかを見ていると思います。 –

関連する問題