jieter / Leaflet-semicircle

Extend Leaflet's circle class to display semicircles.
http://jieter.github.io/Leaflet-semicircle/examples/semicircle.html
MIT License
123 stars 52 forks source link

semiCircle._containsPoint(point) always returns false #42

Open MedAb94 opened 2 years ago

MedAb94 commented 2 years ago

I have the next code:

 let cellPolygone = L.semiCircle(cell.lanLng, {
                    radius: cell.range * 1000,
                    startAngle: cell.angle - 30,
                    stopAngle: cell.angle + 30
                }).addTo(this.map)
let p = this.home_center 
//this.home_center is a L.latLng object
 console.log(cellPolygone._containsPoint(p))

I tried the all the next forms but with the same result

p = {x:x_coord, y:y_coord} 
p = [x_coord, y_coord]
p = L.point(x_coord, y_coord)

It logs always false

Screenshot from 2022-04-13 22-23-28