开发者

Is it possible to mail google maps using php

I have code for finding source and destination in google map. Is it possible to mail that map to a specific mail id using php code . please help me 开发者_StackOverflow中文版 thanks in advance


It is possible to mail a link to a Google Map - just put the link into the E-Mail.

Other than that, I don't think you will be lucky. Google Maps uses extensive scripting. Scripting is not supported in E-Mails.

Google Maps has a static maps API that creates images, but I don't think they do directions on that - and distributing the generated images via E-Mail would probably violate their terms and conditions.


Google maps can be built from their URL. The maps page takes certain variables form the url and uses them to calculate the entire directions. All you have to substitute your locations and way points and any other more advanced options (avoid motorways etc.) and mail that link.

example (guess the location :p ):

http://maps.google.co.uk/maps?hl=en&q=edinburgh+to+london&bav=on.2,or.r_gc.r_pw.&biw=1148&bih=766&um=1&ie=UTF-8&sa=N&tab=wl

Edit: P.S Lat and Lng Values also work in URL

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜