I have a problem with updating the bounds values of a TTMSFNCGoogleMapsRectange in TMSFNCGoogleMaps.
At first I draw a rectangle on the TMSFNCGoogleMaps map with defined bounds:
TMSFNCGoogleMaps1.BeginUpdate;
with TMSFNCGoogleMaps1.Rectangles[0] do
begin
Bounds.NorthEast.Latitude := 40.773941;
Bounds.NorthEast.Longitude := -74.12544;
Bounds.SouthWest.Latitude := 40.712216;
Bounds.SouthWest.Longitude := -74.22655;
Editable := True;
FillColor := gcOrange;
FillOpacity := 0.5;
StrokeColor := gcGreen;
StrokeWidth := 2;
end;
TMSFNCGoogleMaps1.EndUpdate;
Then I get the bounds of the Rectangle and display them in Memo1. Currently everything is ok - the read values of bounds displayed in Memo1 are equal to the values defined in the code.
Memo1.Lines.Clear;
Memo1.Lines.Add( 'NorthEast.Latitude: ' + FloatToStr(TMSFNCGoogleMaps1.Rectangles[0].Bounds.NorthEast.Latitude) );
Memo1.Lines.Add( 'NorthEast.Longitude: ' + FloatToStr(TMSFNCGoogleMaps1.Rectangles[0].Bounds.NorthEast.Longitude) );
Memo1.Lines.Add('');
Memo1.Lines.Add( 'SouthWest.Latitude: ' + FloatToStr(TMSFNCGoogleMaps1.Rectangles[0].Bounds.SouthWest.Latitude) );
Memo1.Lines.Add( 'SouthWest.Longitude: ' + FloatToStr(TMSFNCGoogleMaps1.Rectangles[0].Bounds.SouthWest.Longitude) );
Next I change size of the rectangle (using the mouse) and read the corners of the rectangle again (to update them). Unfortunately, the bounds values are not updated
.
Please advise me how to get the current bounds values of a TTMSFNCGoogleMapsRectange after editing it - maybe it is necessary to refer directly to a javascript procedure?


