After adjusting a rectangle object on the screen, I'm trying to get the boundary Lat/Lons - but the NorthEast and SouthWest values are the same.
Here is my code. I'm not sure what else to try.
procedure TFFuncs_GoogleFNC.FNCGoogleMapsPolyElementEditEnd(Sender: TObject;
AEventData: TTMSFNCMapsEventData);
var b: TTMSFNCMapsBoundsRec;
MyRec:TTMSFNCGoogleMapsRectangle;
begin
if Assigned(AEventData.PolyElement) then
begin
if (AEventData.PolyElement is TTMSFNCGoogleMapsRectangle) then
begin
if ffuncs.FormExists('FGeoFence') then
begin
MyRec:=(AEventData.PolyElement as TTMSFNCGoogleMapsRectangle);
b:=MyRec.Bounds.ToRec;
FGeoFence.YCoord:=b.NorthEast.Latitude;
FGeoFence.XCoord:=b.NorthEast.Longitude;
FGeoFence.YCoord2:=b.Southwest.Latitude;
FGeoFence.XCoord2:=b.Southwest.Longitude;
FGeoFence.UpdateGeoLabels; // Update the Labels
end;
end;
end;
end;