Is there any way to generate random locations nearby map's center within a specific radius in my Form? I can obtain the center of the map with the following line:
var center = gMapControl2.Position;
I did some research and came across to this post but it's in Java.
Assume that center is (x0,y0) and we are looking for a random location (x,y) with maximum distance maxDist from the center. We know that
So first we find a random value for x in the appropriate distance then find a random value for y: