map added to form with ability to add polygons and submit via email

拟墨画扇 提交于 2020-01-06 09:07:32

问题


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



来源:https://stackoverflow.com/questions/29831140/map-added-to-form-with-ability-to-add-polygons-and-submit-via-email

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!