On 25 December 2010 03:32, Alex Genadinik <[email protected]> wrote:
> Hi,
>
> No, I wasn't getting that error.  What tool are you using to see that
> error?

I use Firebug, but the Javascript console or whatever in any browser
should alslo show it.

> Actually I removed that line and the marker still doesn't render.
> Would you be able to tell why?

At the time you place the marker on the map, "map" is undefined
because it's local to your function initialize(). Make it a global
variable and assign its value in that function.

var map; // outside any function is global
function initialize() {
   map = ... // this sets the global variable
   }
function placeMarkers() {
    // it's available here too
    }

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