Andrew, Many thanks for the reply.
I'll have a look at the line you suggest and see if I can make the necessary changes. Kind regards Chris On 9 June 2011 19:56, Andrew Leach <[email protected]> wrote: > On 9 June 2011 19:19, IR HM <[email protected]> wrote: > > > > Independently, I have the code, which works, whereby the user can type in > > the address, clicks 'Search' and the location is pinpointed on the map > and > > the Latitude and Longitude fields on my form are populated with the > correct > > co-ordinates. And by the same token I can get the 'draggable marker' code > > (taken from the demo on the Google API link) to work, but on putting them > > together I don't quite get what I need i.e. The Latitude and Longitude > > fields completed and then a draggable marker which, upon dragging by the > > user updates those fields. > > google.maps.event.addListener(marker, 'dragend', function() { > updateMarkerStatus('Drag ended'); > geocodePosition(marker.getPosition()); > }); > > I've no idea what "geocodePosition()" does; but that event listener is > what happens when the marker is dropped at the end of a drag. Just > include in that handler function what you want to happen, for example > > document.getElementById("myLat").value=marker.getPosition().lat(); > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps JavaScript API v3" group. > To post to this group, send email to > [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-maps-js-api-v3?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
