When I add a Marker this way:

function loadUserInfoToMap()
    {
          // adds the marker as overlay
          map.addOverlay(createMarker(latlng));
     }

    // A function to create the marker and set up the event window
    function createMarker(latlng)
    {
        var marker = new GMarker(latlng);
        GEvent.addListener(marker, "click", function()
        {
            if(latlng)
            {
                //do my own code
            }
        });
        return marker;
    }

The marker appears in a different place, and moves with the zoom level
of the map.

When I add a Marker lthis way:

   var latlng = new GLatLng(32.91072102090145, 35.17478942871094);
   var marker = new GMarker(latlng);
   map.addOverlay(marker);

Everything seems to work just fine...

What am I doing wrong?

Thanks in advance,
Oz Radiano.

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

Reply via email to