Embedding Google Maps
Posted - ⚓When you want to embed a map of a location on a webpage the first place to go is Google Maps. This process is slightly complicated for me as I am using the Maps Preview which removes the default sharing options. Maybe this is a plan by Google to move all developers onto the Google Maps JS API. Though how that benefits normal users who don’t know what Javascript is I don’t know. The original method however was to generate an <iframe>
HTML block to put in your site. This was to me essentially undecipherable. All the options were cryptic URL parameters. Using a little Javascript is much simpler. You define all your options and then add your map to the relevant <div>
. Here is an example:
See the Pen bfdLj by Jonny Barnes (@jonnybarnes) on CodePen