0

How can I centre a map created in Google MyMap when using an iframe embedd?

I have followed the instructions in this answer set the center of a embedded map (google map) to a specific location but there must be something I am doing wrong because when I add it throws up an error on my website.

<div class="<iframe src="https://www.google.com/maps/d/u/5/embed?mid=163MCh2-2Ccq7CFENK2NBWtj7UYVGrHeW&amp;t=k&z=16&amp" width="640" height="480"></iframe></div>">

I would like to add the following lat/long:

40.7127, -74.0059

Many thanks in advance for community assistance - as I only have a high school education, and get easily confused, if someone would be kind enough to paste the complete code above with the lat/long code added I would be hugely grateful!!

Simon
  • 1
  • 1

1 Answers1

0

You have a syntax error in your HTML, you put your iframe in a class of the div and the open-close quotes are incorrect as well

<div class="<iframe src="https://www.google.com/maps/d/u/5/embed?mid=163MCh2-2Ccq7CFENK2NBWtj7UYVGrHeW&amp;t=k&z=16&amp" width="640" height="480"></iframe></div>">

The following should have the desired output

<div><iframe src="https://www.google.com/maps/d/u/5/embed?mid=163MCh2-2Ccq7CFENK2NBWtj7UYVGrHeW&amp;t=k&z=16&amp&ll=40.7127, -74.0059" width="640" height="480"></iframe></div>

I added the lat and long given in the answer you linked

burned_fenrir
  • 138
  • 2
  • 13