コード例 #1
0
ファイル: MainPage.xaml.cs プロジェクト: ackratos/USTCMap
 private bool islocationInView()
 {
     iustc.map.data.Rectangle rect = getView();
     GeoPoint p = new GeoPoint(watcher.Position.Location.Latitude, watcher.Position.Location.Longitude);
     return rect.contains(p);
 }
コード例 #2
0
ファイル: Rectangle.cs プロジェクト: ackratos/USTCMap
 public bool contains(GeoPoint point)
 {
     return south < point.lat && point.lat < north && west < point.lon && point.lon < east;
 }
コード例 #3
0
ファイル: MainPage.xaml.cs プロジェクト: ackratos/USTCMap
        private bool isInWestCampus()
        {
//            if (this.lat > westCampus.south && this.lat < westCampus.north &&
//                this.lon < westCampus.east && this.lon > westCampus.west)
            GeoPoint p = new GeoPoint(this.lat, this.lon);
            if(westCampus.contains(p))
                return true;
            return false;
        }