Generate Pushpins within a Polygon Sample This sample shows how to use the TestDataGenerator and the Spatial Math module to generate random pushpins using the getPushpins function that are inside a polygon.
TestDataGenerator documentation
Spatial Math Geometry documentation