Answer the question
In order to leave comments, you need to log in
Google maps api show all pharmacies nearby?
You need to upload a map to the site, which will display all the pharmacies in this area, i.e. we send the user's coordinates to the Google map (we learn through js) and pharmacies should be marked in this area.
The question is how is this done in the Google maps api, because in public maps from Google, it is enough to enter "Pharmacy" in the search and all pharmacies in the current area will be marked on the map?
PS Pharmacies need to be taken from the Google maps database, because. compiling your database of pharmacies is not an option.
Answer the question
In order to leave comments, you need to log in
In order to get data from the Place API
You can use a query to search for places.
Where:
location - coordinates of the search point,
radius - search radius, respectively,
keyword - what to look for (example "Pharmacy").
The API will return json with a list of objects where it finds the word "Pharmacy".
For clarification, you will need to make a request to the Place Details API
Where:
placeid - specify the object (found in the previous request) for which information is needed.
After, all these data can be used in the Map SDK (create the required number of pins)
PS: Do not forget to activate the application in the Google Developer Console
All this is here
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question