S
S
Shillkas112019-07-23 22:01:38
Google Maps
Shillkas11, 2019-07-23 22:01:38

Google maps embed api search mode?

Task: you need to upload Google maps to the site where the nearest pharmacies will be marked with markers, find out on the site (via javascript) the user's geolocation and, in accordance with it, upload a Google map with pharmacies.
The Maps Embed API is suitable for this, resulting in an iframe like this:

<iframe
  width="1000"
  height="600"
  frameborder="0" style="border:0"
  src="https://www.google.com/maps/embed/v1/search
    ?key=KEY
    &q=Pharmacy
    &center=50.445471,30.513193
    &zoom=13" allowfullscreen>
</iframe>

With such a load, the location is determined in accordance with geographic coordinates center, everything is correct here, but the markers for the "Pharmacy" request are determined in a different place (calculated by Google by ip), why this happens, because even in the https://developers.google documentation. com/maps/documentation/e... says that to search in the specified area, you must specify centerand zoom?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question