Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
135 views
in Technique[技术] by (71.8m points)

Is there no way to embed a Google Map into an HTML email?

I have done a good amount of research and have found several "solutions" such as the static maps API and simply sending a link to a Gmap. However is there really no way to actually send someone a Google Map?

question from:https://stackoverflow.com/questions/24355007/is-there-no-way-to-embed-a-google-map-into-an-html-email

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Well your own research shows that most mail clients don't do iFrames, so what do you think can be done?

This is on purpose by the way. iFrames and JavaScript are security risks that mail services don't want to deal with.

Your best bet is to get a static image of the map and embed it as an image in an HTML email. Put a hyperlink on it to the "full" map on Google Maps.

To do this manually in Gmail:

  1. Go to http://staticmapmaker.com/google/ or similar
  2. Enter the location
  3. Copy the map image to your clipboard and paste it into an email
  4. Copy the href of the anchor in the section "Map with link to Google Maps"
  5. Select the whole image (put the cursor to the right of the image, and press shift + left arrow
  6. Press ctrl+k to hyperlink the image
  7. Paste the url from step 4 into the Web Address field

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...