Try with beachMarker.getPosition() http://code.google.com/apis/maps/documentation/javascript/reference.html#MarkerOptions
On Fri, Jun 11, 2010 at 11:11, Nijs9 <[email protected]> wrote: > I create a custom marker in this way, but when I add the click event I > dont know how to get the Latitude and longitude out of that marker. > Does anybody know how to do it?: > > // create the marker > var image = new google.maps.MarkerImage('http://www.vfr.be/Images/ > waypoint.png', > new google.maps.Size(20, 20), > new google.maps.Point(0,0), > new google.maps.Point(10, 10)); > var myLatLng = new google.maps.LatLng(lat, lng); > var beachMarker = new google.maps.Marker({ > position: myLatLng, > map: map, > icon: image > }); > > google.maps.event.addListener(beachMarker, 'click', function(){ > > alert(beachMarker.LatLng() + "|" + beachMarker.lng()); > startPoint = true; > > }); > > -- > 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]<google-maps-js-api-v3%[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.
