This is what google maps suggests me to use for embedding the map to my site:
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d2964.797839390929!2d21.414694!3d42.004614!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x1354145ab3a48fd5%3A0x9f3ee09c5eb92ad9!2sRestaurant+Jana!5e0!3m2!1sen!2s!4v1409184591679" width="600" height="450" frameborder="0" style="border:0"></iframe>
This is the point it should display: https://www.google.com/maps/place/Restaurant+Jana/#42.004614,21.414694,17z/data=!3m1!4b1!4m2!3m1!1s0x0:0x9f3ee09c5eb92ad9?hl=en-US
But this is how it looks:
0 zoom and map is not fully loaded. What am i doing wrong here?
Related
I'm trying to share the Google Maps by IFRAME and I've got this error in console
The library search is unknown. Please see https://developers.google.com/maps/documentation/javascript/libraries
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2795.5423816131142!2d11.312607315808078!3d45.519289937786425!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x477f48c46ad35441%3A0x9a16514436b0fe8e!2sMarmi%20Zem%20di%20Ziche%20Enrico!5e0!3m2!1sit!2sit!4v1676708610573!5m2!1sit!2sit" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2795.5423816131142!2d11.312607315808078!3d45.519289937786425!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x477f48c46ad35441%3A0x9a16514436b0fe8e!2sMarmi%20Zem%20di%20Ziche%20Enrico!5e0!3m2!1sit!2sit!4v1676708610573!5m2!1sit!2sit" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
I just copy and paste the above code
I'm taking the code from Google Maps, -> Share -> Embed a Map
I'm not using the API
do you know why?
You are getting the mentioned console error because you must embed the iframe with a [Google Maps Platform API key].
Example:
<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap" type="text/javascript"></script>
Instead of:
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2795.5423816131142!2d11.312607315808078!3d45.519289937786425!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x477f48c46ad35441%3A0x9a16514436b0fe8e!2sMarmi%20Zem%20di%20Ziche%20Enrico!5e0!3m2!1sit!2sit!4v1676708610573!5m2!1sit!2sit" width="600" height="450" style="border:0;" allowfullscreen="" loading="lazy" referrerpolicy="no-referrer-when-downgrade"></iframe>
The Google Maps Platform documentation is quite straightforward when it comes to the instructions to deploy this iframe. These are the two links you will need:
How to embed a map: https://developers.google.com/maps/documentation/embed/embedding-map?hl=es-419
API usage: https://developers.google.com/maps/documentation/embed/get-api-key
Sidenote: Be wary that it is mandatory to provide a billing method when creating your key, so that Google can charge for the usage of the embeded map if it exceeds a given number of requests to their API.
I want the users of my webpage to be able to see an embedded google map with directions from their location to my address.
The following link correctly gets a users location and get the directions to London Bridge.
www.google.co.uk/maps?saddr=my%20location&daddr=london%20bridge
If I use google to get an embed link for that page the start address becomes static. So the embedded map wouldn't get the users location it would just use mine from when I created it.
Swapping the embed source from google with the above link results in a "could not be found" error.
<iframe src="https://www.google.co.uk/maps?saddr=my+location&daddr=london+bridge" width="600" height="450" style="border: 0;" frameborder="0" allowfullscreen="allowfullscreen"></iframe>
<iframe src="https://www.google.com/maps/embed?pb=!1m26!1m12!1m3!1d158597.88842955438!2d-0.5380009862678417!3d51.60320274241831!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!4m11!3e6!4m3!3m2!1d51.704112699999996!2d-0.7091171!4m5!1s0x4876035159bb13c5%3A0xa61e28267c3563ac!2sLondon+Bridge%2C+London+SE1+9DD!3m2!1d51.5078788!2d-0.0877321!5e0!3m2!1sen!2suk!4v1485450192422" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
Attempting to modify the embed code from google also results in a blank world google map.
<iframe src="https://www.google.com/maps/embed?saddr=my%20location&daddr=london%20bridge" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
Trying to change the zoom level of the map returned below. I am using it as a link in excel. Have looked around and thought this should work as I change the z=1 to z=2, etc.
http://maps.google.com/maps?z=1&t=h&q=2517 MCDEARMON ST,SACHSE,TX,75408
That is with the "old" google maps, it was never documented and no longer works. If you want a URL for an embedded google map, use the Embed API, it has a documented zoom parameter.
example 2 embedded maps, just changing the zoom parameter in the URL
<iframe width="600" height="450" frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?q=2517+MCDEARMON+ST,SACHSE,TX,75408&zoom=10&key=API_key" allowfullscreen></iframe>
<iframe width="600" height="450" frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?q=2517+MCDEARMON+ST,SACHSE,TX,75408&zoom=1&key=API_key" allowfullscreen></iframe><script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
I try to add google map embed api to my site. That like from documencation, like the following
<iframe
width="600"
height="450"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=API_KEY
&q=Space+Needle,Seattle+WA" allowfullscreen>
</iframe>
But, I don't know how to add marker to embed api. Can someone help me out?
I just had this issue. I tried the "directions" for a set of markers, seems to work. In my case it was an itinerary so it was reasonable.
iframe width="600" height="450" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/directions?key=my key here&origin=45.476112,-73.823152&destination=45.800000,-73.823298&mode=walking&waypoints=45.47611153,-73.82315248|45.56712414,-73.82331277|45.6,-73.82318975|45.7,-73.83250646|45.8,-73.82329847¢er=45.47611153,-73.82315248&zoom=14" allowfullscreen=""></iframe>
If you happen to know how to get it to go fullscreen, I'd be grateful.
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d26008.43855814021!2d-78.795673!3d35.428672!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0xf25f9e0e1fa54ed!2sLillington+Veterinary+Hospital!5e0!3m2!1sen!2sus!4v1393359301118" width="450" height="200" frameborder="0" style="border:0"></iframe>
I am using the above code to embed a google maps preview on a website. But, the problem is, it is zooming all the way out to the entire world map when placing on website. When I click preview embed size (custom size) on google maps when creating the map, it shows perfectly.
Screenshot included of how it is showing up on website located here: https://productforums.google.com/forum/#!category-topic/maps/issues-and-troubleshooting/maps/mac/chrome/KaQPRdnK4ZU
Am I doing something wrong? I'm new to embedding google maps.
this seems to work:
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps?t=m&hl=en-GB&gl=US&mapclient=embed&ie=UTF8&ll=35.432002,-78.795919&spn=0.04336,0.084543&z=14&iwloc=lyrftr:m,1091553228966483181,,&output=embed"></iframe><br /><small>View Larger Map</small>
See here: http://jsfiddle.net/5zpd9/
On the older version of Google Maps, has gives you the embed link when click the Chain Link icon:
Oh, and the newer version can be linked by pressing 'Share and Embed map':
Which will show the newer version using:
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d26008.454059026204!2d-78.795912!3d35.428624!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0xf25f9e0e1fa54ed!2sLillington+Veterinary+Hospital!5e0!3m2!1sen!2sus!4v1393365205127" width="600" height="450" frameborder="0" style="border:0"></iframe>
http://jsfiddle.net/5zpd9/1/