Map Polygon Free Drawing
This is a map polygon with a freehand option. I used mapbox.js for the map and leaflet.freedraw.js for the freehand drawing. You can edit it using leaflet.js if you want. GithubYou can view it at .
On the Web Page Live Preview
Freehand Drawing Option
When you select a polygon area on the map, the Javascript function retrieves and encodes the polygon's coordinate array. It then sends this encoded array via a get request.
When the encoded string arrives in a get request, another function receives it, decodes it, and then populates a polygon area using that string of coordinates.