回答

1

我相信你不需要任何功能来检查它。简单的逻辑能做到这一点。

请尝试下面的逻辑。

期矩形

public void rectangleRegionChecker() { 
    double Given_Lattitude; 
    double Given_Longtitude; 
    double SouthWestLattitude; 
    double SouthWestLongtitude; 
    double NorthEastLattitude; 
    double NorthEastLongitude; 
    if((SouthWestLattitude<=Given_lattitude)&&(SouthWestLongtitude<=Given_Longtitude)&&(NorthEastLattitude>=Given_Lattitude)&&(NorthEastLongtitude>=Given_Longtitude)){ 
    S.O.P("Inside the Rectangle"); 
    } 
} 

我相信这将帮助你很多。

+1

我理解逻辑。但是,它会为Google Maps API起作用吗?那么Google Maps API中的Circle又如何? – Arun

相关问题