map.data.add(new maps.Data.Feature({
geometry: new maps.Data.Polygon([points]),
properties: {
color: '#ff00ff',
type: 'playground'
}
}));
...
map.data.toGeoJson(function (obj) {
postToServer(obj);
});