如何在google.maps.places.autocomplete上设置几个类型?

时间:2013-04-15 09:13:20

标签: google-maps

我想展示城市和国家,但我只是城市

这有效

    var options = {
      types: ['(cities)'],
    };

    var autocomplete = new google.maps.places.Autocomplete(input, options);

这不起作用

    types: ['(cities)','(coutry)'],

    types: ['(cities),(coutry)'],

    types: ['(cities,coutry)'],

1 个答案:

答案 0 :(得分:1)

迟到总比没有好,我认为

types: ['(cities,country)']