Ok thank you,
I thought that createMarker was a specific API function that could not
be renamed.

On 26 Giu, 13:41, "[email protected]" <[email protected]> wrote:
> On Jun 26, 3:11 am, pinzerik <[email protected]> wrote:
>
>
>
> > Hi there,
> > I'm attempting to create different markers depending from different
> > data origin:
>
> > I'd need a function like this:
> > function createMarker(point, label)
> > {
> >         var marker = new GMarker(point, icon);
> >         GEvent.addListener(marker, "click", function()
> >         {
> >         marker.openInfoWindowHtml(label);
> >         });
>
> >         return marker;
>
> > }
>
> > -----------------------------------
> > and another one like this:
> > function createMarker(point,name, address)
> > {
> >         var marker = new GMarker(point, icon2);
> >         GEvent.addListener(marker, 'mouseover', function()
> >         {
> >         marker.openInfoWindowHtml(name);
> >         });
>
> >         return marker;
>
> > }
>
> > how can I use them together?
>
> You can't.  You have to give them different names
> createMarker1(...)/createMarker2(...)
> or make it a single function that behaves differently depending on
> whether the "address" argument is present.
>
>   -- Larry
--~--~---------~--~----~------------~-------~--~----~
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