-2
我想要獲得特定類型的附近位置,但該類型在谷歌地圖上不存在。我想添加該類型。有可能我們可以在Google地圖上添加類型。如何在谷歌地圖上設置特定類型的位置?
我想要獲得特定類型的附近位置,但該類型在谷歌地圖上不存在。我想添加該類型。有可能我們可以在Google地圖上添加類型。如何在谷歌地圖上設置特定類型的位置?
類型在谷歌地圖上不存在。
您可以添加以下代碼:
var service = new google.maps.places.PlacesService(map);
service.nearbySearch({
location: theLocation.value,
radius: radius,
type: ['restaurant'],
openNow: true,
minPriceLevel: minprice
}, yourCallback);
,並指定要查找與type
參數(在這裏,我們找到一些餐館)位置的類型。
您可以參考documentation類型參數在附近的搜索描述中指定。
告訴我,如果你有一些問題。
我正在爲裁縫開發應用程序。我只需要搜索附近的裁縫。但沒有裁縫類型。我將在我的數據庫中存儲裁縫和位置。 –
好吧,這不是我的專長,但您可以在Google上查閱[this](https://developers.google.com/maps/documentation/javascript/mysql-to-maps)頁面。 –