Google Map & Marker - With No API KEY

If you want to create a google map with a marker stick the following code in a custom code block and change the longitude and latitude coordinates to what you need from searching google maps. Once you’ve searched, right click the marker & click the coordinates at the top, it’s then copied to your clip board.

change these bits (-36.623758386860175) & (174.5020302019307) but leave the comma between them there.

This example is Kaukapakapa in Auckland, New Zealand.

<iframe width="100%" height="500" src="https://maps.google.com/maps?q=-36.623758386860175, 174.5020302019307&output=embed"></iframe>

I think generally when embedding a Google map on a website, you want to actually get the business name with all the associated Google Map info (like ratings, etc) to show up (assuming the website is for a business), not just the geographical location. I’ve found that just putting in the business name followed the city/town is enough for Google’s algorithm to get the map to locate the business. Location is usually necessary, because many businesses names are used many times in multiple place. I have a Google map on the website for one of my clients, O’Brien & Associates, and the map kept randomly pulling up businesses other than his that were also named “O’Brien & Associates” until I added the city after the name of the business. No problems since then.

Be mindful of Google’s in-depth TOS as they can be pretty picky.

Hi printninja yes I agree, this is just a quick and dirty way to get a map working without the API key. I have quite a few client maps all with the API keys & Google My Business.

Could you expound on this? Is there some rule regarding embedding Maps incorrectly, or something that Google frowns upon? You’ve got me curious.

Nothing in particular.

The iframe approach is basically relative to the embed approach outlined here.
Share, send, or print directions from Google Maps - Computer - Google Maps Help

That and the API are two entirely separate entities. So I was not explicitly stating there is an infraction only that each of Google’s offerings and entities have varying terms, guidelines, etc. That these should always be considered if one is considering to circumvent said terms and guidelines set forth by the juggernaut that is Alphabet Inc. The thread title vaguely implies such but in reality its not really applicable or the same requirements involved.

It was simply a broad statement not declaring a definitive infraction or directly referring to this as any direct type of violation. I just thought it was worthy to mention overall as stated above in broad terms. Google does a great job with terms, legalities and in-depth documentation so its up to each individual to adhere to said guidelines when using their varying services.

Okay. I was curious because I’ve been embedding Google maps in clients websites for over 10 years, and never had an issue or complaint from Google/Alphabet (whether I used the iframe or API method in BSS.)

It’s generally been my experience that if a website/web developer does something egregiously “wrong” in the eyes of Google, Google simple sends an email saying, “you can’t do that, please remove/take down/stop/etc…” I mean, unless you’re using Google maps to run a dark web drug trafficking or kiddie porn website, etc, I doubt there’s much to worry about beyond a simple “cease and desist” email.

1 Like