0

what I'm doing wrong.

I try to put a Marker and enable the Drag property, so I can get Lat and Lng coordinates, but, if I move the Marker with the mouse to an other place on the map, this values of geolocation (Lat and Lng) remain the same.

To get these values from my Marker, I'm using this code:

gmapMarcador.Items[0].Position.Lat
gmapMarcador.Items[0].Position.Lng
falsetru
  • 357,413
  • 63
  • 732
  • 636
  • Do you move the item 0??? Or another?? – cadetill Jan 01 '14 at 09:42
  • Yes, the item[0]. I only have one marker on the map. – Márcio Elias Jan 01 '14 at 09:47
  • That works good. What version do you have? [Here](http://www.cadetill.com/files/demo1.zip) a demo (bin and src) to show this functionality, only move the marker and see the infowindows – cadetill Jan 01 '14 at 10:40
  • I'm using Delphi 7 yet, so the demo do not run properly. The GMLib installed is 1.1.0. I will try with XE2 later. – Márcio Elias Jan 01 '14 at 12:20
  • The [same](http://cadetill.com/files/demo2.zip) demo for D6/D7. Download the latest version from SVN repository [here](http://code.google.com/p/gmlibrary/source/checkout) but this work from the first versions – cadetill Jan 01 '14 at 16:07
  • 1
    Thanks for support, I found the problem. Yesterday has my first contact with GMLib, and to start (the demos is for a high Delphi version than mine so I can't use them) I found a tutorial where the instructions tell me to change the property IntervalEvents of the Map Component to 0, and on the event AfterPageLoaded put the code `GMMap1.DoMap`. But now in you demo I see and understand this properties and so "First" parameter of the Event to avoid reloads of the map. Thanks again, sorry for take your time and so sorry for my very bad English. And a Happy new year too... – Márcio Elias Jan 01 '14 at 16:48
  • I don't recommend putting the IntervalEvents value to 0, minimum 100. Happy New year ;-) – cadetill Jan 01 '14 at 17:05

0 Answers0