Larry, Thanks for that but I figured a work-around that using the Info Window itself....
I disabled dragging (of the map) while the info window is open, and called the map.getCenter() function to get the position of the Info Window, and then on the infowindowclose() event I enabled dragging again.... It works great... Thanks anyways...:) -g On Feb 13, 2:42 am, "[email protected]" <[email protected]> wrote: > On Feb 12, 12:19 pm,gheesu<[email protected]> wrote: > > > Hi, > > > I have the following code snippet... > > > GEvent.addListener(map, "dblclick", function(overlay, point) > > { > > var html = ""; > > html += "<input type='button' value='Save Position' > > onclick='save_details(point.lat(), point.lng());'> > > map.openInfoWindowHtml(point, html); > > > } > > > The problem here is that point.lat() and point.lng() gives an error > > saying point is not defined... I understand the problem but I don't > > know the solution... > > > How can I access the InfoWindow's position from the content HTML.??? > > > this.point() didn't work either.. > > > Any help would be much appreciated... > > I usually use marker.openInfoWindowHtml. marker.getLatLng() is the > position of the marker. When you double click on a marker there will > be a reference to it in the "overlay" variable, not the point variable > (that will be null) - assumption - you got the event arguments right, > I didn't check the documentation. > > So... completely untested: > If you click on a marker, overlay.getLatLng() should give a GLatLng > that reflects the position of the marker. You need to test that the > overlay exists and is a GMarker before using it though... > > -- Larry --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" 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-API?hl=en -~----------~----~----~----~------~----~------~--~---
