I'm trying to get my script to add a marker with dynamic positions so I 
won't have to hard-code the positions myself. The problem is that whenever I 
do things like
 
*var some_marker = new google.maps.Marker({
             position: map.getCenter(),
             title: "ANything"});* 
or

*var google_markers = new Array(10);
var google_markers_count = 0;*
*google.maps.event.addListener('some_marker', 'rightclick', function(event) 
{
        if(google_markers_count < 10)
        {
            //alert statement went here just to see if the values weren't 
undefined and they weren't =S
            google_markers[google_markers_count] = new google.maps.Marker({
                    position: new 
google.maps.LatLng(Math.round(event.latLng.lat()*100)/100, 
Math.round(event.latLng.lng()*100)/100),
                    title: "Marker #" + google_markers_count++
            });
        }
        return false;
});*

I don't get any errors but it just doesn't show up on the map. I even tried 
rounding the latitudes and longitudes to 2 decimal places but still nothing. 
Is there something I'm missing here? If so it'll be deeply appreciated if 
someone could point me in the right direction.

-- 
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.

Reply via email to