Comment
I've placed a Notebook version of this post on my webspace here:
http://facstaff.unca.edu/mcmcclur/polylineDecoder.zip
The Notebook is actually contained in a ZIP file that also contains all the Java class files necessary to get this code to work. The Notebook sets the Java class relative to it's own directory using AddToClassPath[NotebookDirectory[]], so everything should just run without difficulty.
Answer
Here's my preferred java polyline decoder:
https://github.com/scoutant/polyline-decoder
The advantage of this version is that it is self-contained, while Jeffery's depends on a GeoPoint class defined in a rather large SDK.
After compiling the files in src/main/java/org/scoutant/polyline, you can use the decoder like so:
Needs["JLink`"];
InstallJava[];
AddToClassPath["scoutant-polyline-decoder-76406ba/src/main/java/"];
polylineDecoder = JavaNew["org.scoutant.polyline.PolylineDecoder"];
decoded = polylineDecoder@decode["wjiGtdpcNrAlBJZ"];
length = decoded@size[];
Table[
point = decoded@get[k];
{point@getLat[], point@getLng[]},
{k, 0, length - 1}]
(* Out:
{{1.3638, -79.3865}, {1.36338, -79.3871}, {1.36332, -79.3872}}
*)
While the latitudes all disagree with your expected result, it agrees with my javascript decoder:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/decode.html
It also agrees with Google's own polyline decoder utility:
https://developers.google.com/maps/documentation/utilities/polylineutility
An example using imported directions
As a fun example, we could download some driving directions from Google Maps, extract the encoded polyline string, and display it on a CountryData map.
Needs["JLink`"];
InstallJava[];
AddToClassPath[NotebookDirectory[]];
polylineDecoder = JavaNew[
"org.scoutant.polyline.PolylineDecoder"
];
jsonString = StringDrop[Import[
"https://maps.google.com/maps?saddr=NY,+NY&daddr=LA,+CA&output=json"
], 9];
json = ImportString[jsonString, "JSON"];
polylines = "polylines" /.
Cases[json, HoldPattern["polylines" -> _], Infinity];
pointStrings = Table["points" /. polyline, {polyline, polylines}];
pointString = First[pointStrings];
pointString = StringReplace[pointString, "\\\\" -> "\\"];
decoded = polylineDecoder@decode[pointString];
length = decoded@size[];
pts = {#@getLng[], #@getLat[]} & /@ decoded@toArray[];
Show[{
CountryData["UnitedStates", {"Shape", "Equirectangular"}],
Graphics[{{Blue, Line[pts]},
{PointSize[Large], Green, Point[First[pts]], Red,
Point[Last[pts]]}}]
}]

GeoPointclass, and I have no idea where to get it. Lastly, Mark McClure has Mathematica code to do perform the decoding, so you could use his – rcollyer Oct 4 '12 at 4:15