Hi,
I've been given some encoded polylines to display on a google map. However I'm using JQuery for a lot of the front end functions and am now stuck trying to find the correct syntax for displaying encoded polylines using JQuery. The standard syntax for adding an encoded polyline is
var polyline = new GPolyline.fromEncoded({
color: "#0000ff",
weight: 4,
opacity: 0.8,
points: "_gkxEv}|vNM]kB}B}@q@YKg@IqCGa@EcA?c",
levels: "P@B@D??@@?D?CA?B",
zoomFactor: 2,
numLevels: 18
});
map.addOverlay(polyline);
Obviously this doesn't work with JQuery. to add a normal polyline with JQuery you'd use
new google.maps.Polyline({
path: stationPathCoordinates1,
strokeColor: "#20B5B3",
strokeOpacity: 1.0,
strokeWeight: 4
Where StationPathCoordinates is the array of long and lats. I now have this array in an encoded polyline. I assumed it may be new google.maps.Polyline.fromEncoded but this doens't work. Anyone know the syntax for this in JQuery or if it even possible?
Thanks in advance