On Dec 6, 2:51 pm, xelawho <[email protected]> wrote: > Hi, > > I have a problem that's more annoying than anything else. I have a > page that does Mike W's car trip from a hardcoded polyline and it's > working fine, but throwing up errors from the main.js that I have no > idea how to solve. > > The problem (as far as I can tell) lies with overlaying the polyline, > in this last bit of code: > > var poly = new GPolyline(points,'#FF0000',3,0.4); > map.addOverlay(polyline); > > of course that brings up a "polyline is undefined" error because > that's the first mention of "polyline" in the code. > > but if I do: > > var poly = new GPolyline(points,'#FF0000',3,0.4); > map.addOverlay(poly); > > you can see the line on the map, but I get hit with a whole bunch of > errors as soon as I hit the start button and the map freaks out and > dies, basically. The same thing happens if I don't overlay anything. > > Overlaying poly2 works ok, but I get a "Cannot read property 'xa' of > undefined" error from the main.js > > Anyway, like I say... it works ok overlaying (polyline) or (poly2), > but it would be nice to get it working error-free, if anybody has any > ideas.
I have an example which does something similar to Mike's "cartrip" but on a polyline from an xml file. It was created for this thread: http://groups.google.com/group/google-maps-api/browse_frm/thread/98dd941c5d96782c/e240b28d3ca825d3?lnk=gst&q=mike+williams+epoly+geocodezip#e240b28d3ca825d3 http://www.geocodezip.com/track_pefa9f.asp You might be able to use it and/or compare it to your code to see what you are doing wrong. > > Here's the almost-working version:http://xelawho.com/map/moving15.htm That one puts out the obvious javascript error polyline is undefined, which you know the solution to. -- Larry > > thanks in advance... -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
