Hi all,
I was curious if anyone has successfully embedded Google Maps within an email. I've read about the landing page embeds, but I assume the email would be similar. Is it as simple as connecting the embeddable files via a script token?
Solved! Go to Solution.
There’s no need for a webhook (how would you store the binary response?). The Maps service is the src of your img tag.
yeah - try just sticking that as the source in an image tag.
Cheers
Jo
Mail clients won’t run JS, period.
You can use a service that returns a map-like image based on query params in the URL.
try this: https://developers.google.com/maps/documentation/maps-static/start
I've not done it, but it is pretty straightforward.
Let me know if you need more help.
Cheers
Jo
I deliberately said “a service” and not Google’s service because of this part, though 🙂 —
Signed requests aren’t suitable for email on their own.
True enough.
I suppose it depends on OP's volumes.
That having been said, If one doesn't currently exist, it'd be trivial to create a service that held the signing details, took the balance of parameters in the URL, and requested the image from google, and returned the image to the original caller.
Cheers
Jo
Hey @Jo_Pitts1,
My requests will come in lower, so I think the static is a viable option. I've gotten the webhook for the static service setup, as well as my Maps API. The only thing I'm missing is the response, or how best to send it?
Or am I over thinking this and a call like this goes within the html of the email?
https://maps.googleapis.com/maps/api/staticmap?center=Berkeley,CA&zoom=14&size=400x400&key=KEY
SNAP 🙂
@Jo_Pitts1 @SanfordWhiteman Ah, yeah I figured it was something simple like that (I'm no engineer, but trying based on all of this haha)
Thanks y'all!