ImageEn, unit iexVirtualBitmaps

TIESlippyMap.BmpXToLongitude

TIESlippyMap.BmpXToLongitude


Declaration

function BmpXToLongitude(X: integer): double;


Description

Converts from horizontal bitmap coordinates to longitude (decimal degrees).
This conversion depends on the current Latitude, Longitude, PointPosition and Zoom.

Parameter Description
X Bitmap column relative to top-left position


Example

// handles OnMouseMove and gets latitude and longitude under the mouse position
procedure TForm1.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
var
  bmpX, bmpY: integer;
  longitude, latitude: double;
begin
  bmpX := ImageEnView1.XScr2Bmp(X);
  bmpY := ImageEnView1.YScr2Bmp(Y);
  longitude := TIESlippyMap(ImageEnView1.IEBitmap.VirtualBitmapProvider).BmpXToLongitude(bmpX);
  latitude  := TIESlippyMap(ImageEnView1.IEBitmap.VirtualBitmapProvider).BmpYToLatitude(bmpY);
end;


See Also

 BmpYToLatitude
 LongitudeToBmpX
 LatitudeToBmpY