2017-09-05 43 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)頁面。 –

相關問題