Hi,
Is it possible to create points from polygons on the fly and display them on the web map ?
For example, if I go to style -> Choose attributes -> Expression, then I use the codes below to get the centroid. I click on "Test" and see it actually returns the centroid but I have no idea how to make the point returned show up on my map. Any help is greatly appreciated.
var vgeometry = Geometry($feature);
Console('\nvgeometry:' + vgeometry + 'dog' );
//var vline = Polyline(vgeometry);
//Console('\nvgeometry:' + vgeometry + 'dog' + '\nvline:' + vline + 'bird');
var vcentroid = Centroid(vgeometry);
//Console('\ncent:' + vcentroid + 'cat');
var vpoint = Point(vcentroid);
//Console('\npoint:' + vpoint);
console('Monkey');
console(vpoint);
return vpoint;