简体   繁体   中英

Specific Autocomplete types in Google Maps API

I've been trying to use google maps api to auto fill a location field (using javascript) I used the establishment filtering as I only wanted specific places. But I realized that establishments was still too broad. Is it possible to narrow it down even more ? I wanted to narrow it down to only hospitals, clinics, etc. This link Says that only geocode, establishment and regions are possible in autocomplete.

I wanted to use more specific types like the ones found in this link I wasn't able to find any resource which explains how to use those types for auto complete. Can someone help me out with this ?

PS : I'm using maps api v3

If you want only specific places like hospitals or pharmacy etc, you can use PlacesService to find the exact locations available. Pre-fetch these places based on location and show them as autocomplete suggestion. Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM