On Aug 25, 5:10 am, VirtualWalk <[email protected]> wrote: > I'm working on a project where the following takes place: > > A user joins a virtual walking challenge > They upload the distances from their pedometer on a regular basis > Their new distance generates a new position on the map route > They see their new location and how far to go to the end of the > challenge > > I'm planning on all sorts of other bits including walking as part of > as a group. > > The planned route is from John o'Groats to Land's End which whilst > unoriginal seems to capture the imagination (I plan on people being > able to nominate new challenges for future inclusion). > > I've been spending a lot of time researching the best way to do this > and having got the form submission working and the distance updating > correctly I'm now working on the next stage. > > Having read around I realised that I need to use the fabulous > epoly2.js to place a marker on the route to match the user's > position. I want the distance to use from mySQL but that's a > challenge for another day! > > I then read about the problems with generating a complex polyline on > the fly each time and the numbers of calls to the Google database. > The challenge map page needs to have a summary of the route with no > markers on it, the overall (logged in) challenge homepage all the > participants on a clustered map (planning to use KML or csv for this > with no route showing) and the the user's map only their position > (which I've got working from mySQL). > > So I decided to generate an encoded polyline and use that for the > route. I visitedhttp://www.geocodezip.com/example_geo2.aspand > generated the xml for the Gdirections route using their encoded xml > generator. The Google Maps encoder is no good as the route needs to > follow roads not traverse the sea! > > I then cut and pasted the encodedPoints and encodedLevels from the XML > generated to my page. I got the error 'expected hexadecimal'. I then > researched problems and discovered the issue with '\' in the generated > encoding so I've replaced all single '\' with double '\\' and all > double '\\' with quad '\\\\'. > > However, I still have the same problem. > > The page is here: http://www.virtualwalk.co.uk/Sorting_Map.htm
What is with the zoomFactor of 32? If I run your points through Mark McClure's decoder http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/decode.html then re-encode them: http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/encodeForm.html I get a polyline, but his code set zoomFactor to 2 and numLevels to 18. -- Larry > > My website is on Joomla but Jumi allows for html/php/javascript to be > embedded in Joomla code without problems and I'm getting exactly the > same error on the standard htm page as I am within Jumi so I think > that thinking it was a Joomla issue is a red herring (are there such a > thing?). > > I'm outside my comfort zone with the encoded polyline but want to > ensure that I code as efficiently as possible so I don't incur lots of > ISP bandwidth charges and a Google Maps ban if lots of people join the > site and take part in the challenges (over 1,000 people took part in > the last challenge I took part in). > > I have had lots of help so far getting the bits that work working so > any help really appreciated :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
