Well, I still cannot get the line to disappear, but it could be because you're making the browser do so much work.
Aside from the 100 calls to altitude.php you are also calling Google Charts 100 times! That's 200 http requests before your map can render, where you could be doing the same with just 2 calls. Try reorganizing the strategy: -- First read the GPX, and append each lat/lon's to a string with some separator. -- When that loop has completed call altitude.php once, with that long string of lat/lon's as parameter. Use the POST method if the string is too long. -- Let PHP split the string into individual points, look up the altitudes, wherever it does that, and return one long string of altitudes. -- Use plain text rather than XML to return results from PHP. -- Then call Google Charts only once, with that long string of altitudes. That's just an overview of a strategy that should allow your page to load about 100 times faster. Give it a try and see if the polylines start behaving. -- Marcelo - http://maps.forum.nu -- On Oct 23, 9:27 pm, "[email protected]" <[email protected]> wrote: > Hi Marcelo > > I am using FF 3.5.3 and one of my friends was getting the same problem > using safari, it's weird but if I zoom out and then pan out of view > but then come back the polyline has gone but the points are there (I > know its an issue which is never likely to happen in real life but > wanted to try to get it right) > > The reason I don't use the altitude info in the gpx file is that it is > so far from correct it is useless unfortunately. > > I'll have a look at my GDownloadUrl call and try to change it although > I am not particularly skilled in javascript but I am trying! > > Thanks > > Gordon > > On Oct 23, 8:03 pm, Marcelo <[email protected]> wrote: > > > On Oct 23, 9:02 pm, Marcelo <[email protected]> wrote: > > > > I don't see the points disappear, (Firefox 2), > > > Sorry, I meant I don't see the *polyline* disappear! :-) > > > -- > > Marcelo -http://maps.forum.nu > > -- > > > but there is another > > > > problem, and that is that you're asking the browser to do way more > > > work than necessary. > > > > You're calling the function getAltitude() maxNodes times, and that is > > > 100 times GDownloadUrl()! > > > You could send all points in one call, as POST data, and get back a > > > long comma separated string that you split() into an array.Then you're > > > done with just one GDownloadUrl call. > > > > Other than that, maybe I looked too quickly, but why are you calling > > > altitude.php if you already have the altitude in the GPX file, in the > > > field <ele></ele>? > > > > -- > > > Marcelo -http://maps.forum.nu > > > -- > > > > On Oct 23, 8:45 pm, "[email protected]" > > > > <[email protected]> wrote: > > > > I wonder if anyone can help me find out why my polyline disappears > > > > after zooming right out and back in again? The points remain but the > > > > polyline disappears. > > > > >http://80.176.208.244/cycle/downloads/1/gmap.php > > > > > Thanks > > > > > Gordon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
