예제 #1
0
//
// Called Sideview, but really we are talking about TOPVIEW!!
//
void MapWindow::SideviewScreen2LatLon(const int &x, const int &y, double &X, double &Y) {
  int sx = x-(int)Current_Multimap_TopOrig.x;
  int sy = y-(int)Current_Multimap_TopOrig.y;
  irotate(sx, sy, Current_Multimap_TopAngle);
  Y= PanLatitude  - sy*Current_Multimap_TopZoom;
  X= PanLongitude + sx*invfastcosine(Y)*Current_Multimap_TopZoom;
}
예제 #2
0
void ScreenProjection::Screen2LonLat(const POINT& pt, double &Lon, double &Lat) const {
    const int sx = pt.x - _Origin.x;
    const int sy = pt.y - _Origin.y;

    Lat = _PanLat - ((sy * _CosAngle + sx * _SinAngle + 512) / 1024) / _Zoom;
    Lon = _PanLon + ((sx * _CosAngle - sy * _SinAngle + 512) / 1024) * invfastcosine(Lat) / _Zoom;
}
예제 #3
0
void MapWindow::Screen2LatLon(const int &x, const int &y, double &X, double &Y) {
  int sx = x-(int)Orig_Screen.x;
  int sy = y-(int)Orig_Screen.y;
  irotate(sx, sy, DisplayAngle);
  Y= PanLatitude  - sy*zoom.InvDrawScale();
  X= PanLongitude + sx*invfastcosine(Y)*zoom.InvDrawScale();
}