On Nov 30, 11:18 am, Emre Avsar <[email protected]> wrote:
> Yeah but, how??
>
> look at my function please createMarker();

Why don't you have a look at Mike's, as suggested earlier?
http://econym.org.uk/gmap/basic1.htm

You should find a fairly crucial "var" keyword which makes a variable
local. Your createMarker() function doesn't have that. Unfortunately
when people diverge from that example things tend to go wrong. What
you *should* be doing is using the createMarker() function to create
and return a marker which the calling routine deals with. Don't try
dealing with the marker in the function which creates it.

A potential shortcoming of Javascript is its use of "function" to
define real functions which return something, and also to define
*subroutines* which don't. It's easier to make routines which create
an object into real functions which return that object, and then
routines which don't create objects but merely handle them can be
treated as subroutines.

Andrew

--

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