On Dec 11, 12:37 pm, Pellens <[EMAIL PROTECTED]> wrote:
>
> The test div (see // TEST) show's me the correct data:
But points comes from responseText and is a String object, not an
Array. GPolyline requires an array. You can't do
new GPolyline("[a,b]","#ff0000",2,1) -- it's not the same as
new GPolyline([a,b],"#ff0000",2,1)
> Still, it doesn't draw the lines when I inlcude 'points' into the
> overlay
> // map.addOverlay(new GPolyline(points, '#ff0000', 2, 1)), //
>
> Anyone know a fix to this problem?
Try using eval(points): that evaluates the string and should produce
the array it contains.
map.addOverlay(new Polyline(eval(points),'#ff0000',2,1));
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
-~----------~----~----~----~------~----~------~--~---