Let's try to understand....
in xml file I parse the "tipo" marker and pass it to the variable
type:
var type = marks[i].getAttribute("tipo");
then I call newMarker function, passing type variable:
var mark = newMarker(point, nome, type, null, null, null);
in newMarker function I use type with icontype local variable:
function newMarker(location, html, icontype, iconcolor, iconnum,
iconsize)
In that function I use icontype to use my custom icon:
var temp_marker = new GMarker(location, {icon:customIcons
[icontype],zIndexProcess:markerOrder});
I cannot understand what's wrong.........
On 3 Set, 09:02, pinzerik <[email protected]> wrote:
> I'm terribly newbie:
> I modified the code, but it still doesn't
> work:http://pinzerik.altervista.org/map_KO.php
>
> thanks
>
> On 2 Set, 15:38, Rossko <[email protected]> wrote:
>
> > > The problem is that, for that variable, the syntax is:
> > > function newMarker(location, html, iconcolor, iconnum, iconsize)
> > > so I will never be able to pass it......
>
> > It's your function definition, even if you've copy-pasted it. Alter
> > it.
> > Example -
> > function newMarker(location, html, icontype, iconcolor, iconnum,
> > iconsize)
> > In the function, you might use
> > customIcons[icontype]
> > To call your function, you might do
> > var mark = newMarker(somepoint, tipo, null, null, null);
> > Whatver the value of 'tipo' is when you do that call will get used
> > within the function where 'icontype' occurs.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---