GetPolygone |
Post Reply ![]() |
Author | |
Richard Dufour ![]() Member ![]() Joined: 24 Jun 2014 Posts: 47 |
![]() ![]() ![]() ![]() 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: 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 |
|
![]() |
Post Reply ![]() |
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |