I currently have a section on my website where I ask users to input information on various criteria and the answers get emailed to me (a form with submit button). I would like to add a map to the form in which users can draw shapes such as polygons and circles. Once they submit the form, I would like the map to be emailed along with the other input criteria to me. What is the best code to use?Thank you.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Never too late ...
You can let the browser open a mail client and send the shapes in the body of the mail.
var text=JSON.stringify(drawnItems.toGeoJSON());
window.open('mailto:test@example.com?subject=subject&body=' + text);
Here is a full example