Thanks, but in this way he takes the position of the last added marker. I use a loop to add more than 100 markers, in this way I get only the position of the last added, on each marker i click...
On 11 jun, 11:33, Miguel Angel Vilela <[email protected]> wrote: > Try with beachMarker.getPosition() > > http://code.google.com/apis/maps/documentation/javascript/reference.h... > > > > 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%2b[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.- Tekst uit > >oorspronkelijk bericht niet weergeven - > > - Tekst uit oorspronkelijk bericht weergeven - -- 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.
