First of all, the geocodezip.com is a wonderful site. There may be a potential bug on the page http://www.geocodezip.com/example_geo2.asp, which uses polylineEncoder.dpEncodeToJSON()
Using the form at http://www.geocodezip.com/example_geo2.asp to create encoded polylines, I plotted the path between two points: Point A: North La Veta Pass, La Veta, CO 81055, USA 37.613341,-105.190835 Point B: Fort Garland, CO, USA 37.428897,-105.4339 After the polyline was overlayed I selected 'get polyline xml' with 'Encoded' set to true which generates an xml document. Using the points and levels data (and stripping out the rest of the data) I created an encoded polyline to display in a static map. However, the encoded polyline did not match the polyline from which it was generated. **But, If you replace the occurrences of a single backslash character ("\") to two backslash characters ("\\") in the points data, the problem is fixed.** Example Map: http://crybabydesign.com/sites/test/ This map shows three different polylines, using the lat/long or location data from above. -the first polyline is created using the lat/lng pairs and GDirections -the second polyline is an encoded polyline using the data from 'get polyline xml' from the geocodezip.com form -the third polyline is an encoded polyline using the data from 'get polyline xml' from the geocodezip.com form, BUT replacing the occurrence of "\" with "\" I believe the culprit of the problem is from the PolylineEncoder.js file, specifically the function: polylineEncoder.dpEncodeToJSON(). The function is called at line 599 from http://www.geocodezip.com/example_geo2.asp: var encodedPoly = polylineEncoder.dpEncodeToJSON(points,"#FF0000", 4,0.8); Any suggestions on validating or fixing this issue? thanks. -- 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=.
