Example code (here the example map)
function locChance(polygon, { latLng, radius }) {
// process
}
var polygon = [[2,2],[2,8],[8,8],[4,2]];
var circleLoc = {
latLng: [6,4],
radius: 20
}
var percentage = locChance(polygon, circleLoc); //expect output: 0.6 or 0.71 or between 0.5 to 1
How to get the location chance?