On Jun 26, 11:11 am, pinzerik <[email protected]> wrote:

> how can I use them together?

Call one "createMarker" and the other "createMarker2" and then use
whichever one is relevant.

Alternatively, you could do something like this:

function createMarker(point, text, address)
  {
  if (address) { return createMarker2(point,text,address) };
  else         { return createMarker1(point,text) }
  }

and then rename your existing two-argument createMarker function as
createMarker1 and the other one as createMarker2. Then you can pass
either two or three arguments to createMarker and the correct action
is taken.

What you must not do is have more than function with the same name.
There is no guarante as to which will be used in any particular case.
Some browsers will always use the first; some will use the second.
Other browsers may get hopelessly confused!

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