I use Leaflet for mapping solution for a proof of concept work, and currently stuck for the last couple days at the following issue:
I am adding a marker by clicking on Leaflet map, and by using following leaflet function:
alert(JSON.stringify(e.layer.toGeoJSON()));
I get this GeoJSON string result:
{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[115.1806640625,-2.7235830833483856]}}
What I need is the following GeoJSON string:
{"type":"Feature","properties":{"namo":"Babakansumedang"},"geometry":{"type":"Point","coordinates":[115.1806640625,-2.7235830833483856]}}
The question: How can I programmatically using Leaflet function/Javascript or other possible way, inserting "namo":"Babakansumedang" into GeoJSON "properties" ?