0
目前,我们的系统从特定位置的某个区域返回列表。所以如果我输入一个邮政编码,它将使用界限并带回本地列表。这工作正常。Google Maps API - 从所有匹配的位置获取结果
但是,如果我搜索'纽卡斯尔',它将默认纽卡斯尔泰恩赛德而不是莱姆下的纽卡斯尔。
有没有办法告诉地图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);
任何帮助或建议,将不胜感激。
我想我明白你的意思 - 我会看看 – 2012-03-19 09:25:27