Unit: | SDL_geomap | Class: | TGeoMap | Declaration: | [1] function CalcLongitude (x, y: integer; var valid: boolean): double; [2] function CalcLongitude (APoint: TPoint; var valid: boolean): double; |
The method CalcLongitude calculates the longitude of the pixel position defined by [x,y] (Version [1]) or APoint (Version [2]). The origin of the pixel coordinates is at the top left corner of the map image. The parameter "valid" returns a FALSE value if the longitude cannot be calculated (e.g. the pixel coordinates are outside the calibration range, or the map is not calibrated at all).
Hint: |
Please note that the pixel coordinates x and y (or APoint, respectively) are in the reference frame of the scanned map image (and not that of the screen). Thus, you have to transform any screen or mouse coordinates to the map image coordinates (function ControlToMapImage) before applying CalcLongitude. |
|