ImageEn, unit iexVirtualBitmaps

TIESlippyMap.BmpYToLatitude

TIESlippyMap.BmpYToLatitude

Declaration

function BmpYToLatitude(Y: Integer): Double;

Description

Converts from vertical bitmap coordinates to latitude (decimal degrees).
This conversion depends on the current Latitude, Longitude, PointPosition and Zoom.
Parameter Description
Y Bitmap row relative to top-left position

Example

// Handle 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

BmpXToLongitude
LongitudeToBmpX
LatitudeToBmpY