我一直在看这个例子:
http://code.google.com/apis/maps/documentation/javascript/examples/places-autocomplete.html
并决定将其纳入我的网站.
是否可以仅将地址限制为英国地址?
小智 30
试试这个:
var input = document.getElementById('searchTextField');
var options = {
types: ['(cities)'],
componentRestrictions: {country: 'tr'}//Turkey only
};
var autocomplete = new google.maps.places.Autocomplete(input,options);
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
17261 次 |
最近记录: |