2017-09-05 42 views

回答

0

类型在谷歌地图上不存在。

您可以添加以下代码:

var service = new google.maps.places.PlacesService(map); 
       service.nearbySearch({ 
        location: theLocation.value, 
        radius: radius, 
        type: ['restaurant'], 
        openNow: true, 
        minPriceLevel: minprice 

       }, yourCallback); 

,并指定要查找与type参数(在这里,我们找到一些餐馆)位置的类型。

您可以参考documentation类型参数在附近的搜索描述中指定。

告诉我,如果你有一些问题。

+0

我正在为裁缝开发应用程序。我只需要搜索附近的裁缝。但没有裁缝类型。我将在我的数据库中存储裁缝和位置。 –

+0

好吧,这不是我的专长,但您可以在Google上查阅[this](https://developers.google.com/maps/documentation/javascript/mysql-to-maps)页面。 –

相关问题