1

It is possible to show InfoWindow in center of Drawed Polygon?

I Draw Polygon but the infowindow showed on top of polygon. I want to show in center of polygon. Is it possible?

  • 1
    Welcome to SO. As stated in the guides, please create a [Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). – tmthydvnprt May 27 '16 at 13:21
  • 1
    No, because Google Maps API no provides a method to calculate it – cadetill May 27 '16 at 15:22
  • I suggest to give your question a more descriptive title, people hunting for answerable questions won't be excited for a list of tags. – peterh May 27 '16 at 15:49
  • Thank you for answer Cadetill. I think coordinates of center of polygon is easy to known when using Getcenter - procedure GetCenter(LL: TLatLng);, but the problem for me is to set position of infowindow. Look this example: – Цветан Колев Jun 01 '16 at 18:19
  • this example: with gmpolygon1.Add do begin for x := 0 to strlistpoints.Count-1 do begin if (x mod 2 = 0) then addlinepoint(strtofloat(strlistpoints.Strings[x]), strtofloat(strlistpoints.Strings[x+1])); end; fillcolor := polyfillcolor; strokecolor := polylinecolor; fillopacity := polyopacity; visible := true; text := 'polygon 1'; infowindow.HTMLContent := polyinfo; infowindow.CloseOtherBeforeOpen := false; if polyinfo <> '' then opencloseinfowin; sleep(100); zoomtopoints; end; – Цветан Колев Jun 01 '16 at 18:21
  • i can use opencloseinfowin to show it, but not set position of it. This is possible if i use GMinfowindow. There are is available procedure for position - Position (*) TLatLng TLatLng at which to display this InfoWindow. – Цветан Колев Jun 01 '16 at 18:23

0 Answers0