Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

GetPolygone

 Post Reply Post Reply
Author
Richard Dufour View Drop Down
Member
Member
Avatar

Joined: 24 Jun 2014
Posts: 47
Post Options Post Options   Quote Richard Dufour Quote  Post ReplyReply Direct Link To This Post Topic: GetPolygone
    Posted: 20 Nov 2015 at 9:02pm

Re: TWebGMaps

How can I get the Polygon I clicked on as the IdPolygone proves to be un-reliable:

 <DELPHI>

procedure TMyForm.WebGMapsPolygonClickEvent(Sender: TObject;

  IdPolygon: Integer; Button: TMouseButton);

var

  pnt: TPoint;

  PolygonItem: TPolygonItem;

begin

{ IdPolygone is no good as soon as you delete polygons. Say you have 2 polygons and delete the first one (with an Id value of 0), Poly2 (with Id of 1) is still  at 1 (although we now only have 1 Polygon left on-screen). Clicking on the only one remaining will give us IdPolygon of 0 here, but our value that remains is 1?? }

    ShowMessage( IntToStr( IdPolygon ));  //<-- Not the original Id I was expecting

end;

</DELPHI>

Perhaps I am not going about this the right way, if that?s the case, please point me in the right direction. How can I get the TPolygonItem I just clicked on?

Richard

 

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down