Hi,

I have a bit of a quandry....

I have an encoded polyline:

_zlyH~cXqAgQk@}CsBkGgFiPDElAg@~G}BrVgOFMJc@?m@JyGTcAb@qAP@^v@RnAP^vF`TJE~HoG~F_FvLkKtDkDPeADQNMRIr@@\WTk@Fk@La@b@{@dCcDnMuOrE}FjA}AtD_GFw@Ei@Ya@Me@@WH[FGd@IX?b@QnBuChHsJbCaEAgA@]H_@HMp@U`@gA@]f@uFhCcTFkA@gAKaS?}BKmHGsG[aEu@SSSK]?e@H}@HaDoF_Jc@g@oBsDFg@jDuP~CkMBG~@aAvBgDn@gB@MDKFEDO|D}HFYH{@@sAMiCBi@EiBHmHx@}IDeBT_IPkIKgCPmKvBuAp@]xFmDt@_Ar@eAxCmFaBqC_DcH_@k@sAcES_AQwAsAoHIAMyAPUDC\e@DQ@eCI_Dm@uGq@wEGGGCcB`@cA`@mAhAgEnCc@hAs@tBwBnE_@j@wCfEe@v@s@t@EQKOOMi@gAuBgGCSsAyC[OYI[AIlAOZ

If I paste that into the google example page here: 

http://code.google.com/apis/maps/documentation/utilities/polylineutility.html

I get a series of lat/lng points, and the line can be plotted onto a map. 

I put exactly the same string into this page (view source to confirm): 

http://bbarker.co.uk/busStops/test.php

var 
encoded="_zlyH~cXqAgQk@}CsBkGgFiPDElAg@~G}BrVgOFMJc@?m@JyGTcAb@qAP@^v@RnAP^vF`TJE~HoG~F_FvLkKtDkDPeADQNMRIr@@\WTk@Fk@La@b@{@dCcDnMuOrE}FjA}AtD_GFw@Ei@Ya@Me@@WH[FGd@IX?b@QnBuChHsJbCaEAgA@]H_@HMp@U`@gA@]f@uFhCcTFkA@gAKaS?}BKmHGsG[aEu@SSSK]?e@H}@HaDoF_Jc@g@oBsDFg@jDuP~CkMBG~@aAvBgDn@gB@MDKFEDO|D}HFYH{@@sAMiCBi@EiBHmHx@}IDeBT_IPkIKgCPmKvBuAp@]xFmDt@_Ar@eAxCmFaBqC_DcH_@k@sAcES_AQwAsAoHIAMyAPUDC\e@DQ@eCI_Dm@uGq@wEGGGCcB`@cA`@mAhAgEnCc@hAs@tBwBnE_@j@wCfEe@v@s@t@EQKOOMi@gAuBgGCSsAyC[OYI[AIlAOZ";
var string="<table border=1>";
var decodedPoints = google.maps.geometry.encoding.decodePath(encoded); 

for (var i = 0; i < decodedPoints.length; ++i) {
        //alert(decodedPoints[i].lat(), decodedPoints[i].lng());
        
string+="<tr><td>"+i+"</td><td>"+decodedPoints[i].lat()+"</td><td>"+decodedPoints[i].lng()+"</td></tr>>";
}


And the first 30 lat/lng points are the same - but then the points diverge. As 
far as I can tell both [pages are calling exactly the same decode method on the 
same input string. 

Can anyone suggest why there is a discrepancy?



Cheers,

Ben




-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to