[Google Maps by LxIS] Map does not display in an email

[Google Maps by LxIS] Map does not display in an email

  
Forge Component
(7)
Published on 2014-07-21 by Filipe Martins
7 votes
Published on 2014-07-21 by Filipe Martins
I'm trying to display a multiple markers map in an email and it does not display. Have you seen this before? Should I be doing this a different way?
Thanks,
Gerry
Hi Gerry,

In emails you cannot use javascript. It's a security issue so no email program will execute it or even mark emails with javascript as spam.

This will prevent most components to work in emails, since they need javascript to work.
Do you know of another way to display a static map with a marker in an email?
Hi Gerry,

Take a look into https://developers.google.com/maps/documentation/staticmaps/

Cheers,
Tiago Simoes
Thanks for the help guys.

For those of you that don't know, put an Expression on your page, set Escape Content to No, and set it to something like:

"<img src=""http://maps.googleapis.com/maps/api/staticmap?zoom=13&size=500x300&maptype=roadmap&markers=color:red%7C"+latitude+","+longitude+"&sensor=false"" />"
Hi Gerry,

Cool. Another option would be to use an image of Type External:


You'll need to provide a default image, but in runtime it will be replaced by whatever is calculated in the URL.

Cheers,
Tiago Simões