I would appreciate help in understanding the reason for the console error: "Invalid value for constructor parameter 0" in this instance. I have a map, and when you click a marker, a path is displayed via the markers On-Click Listener. It works fine when the location array is 'local' (within the script file). I would like to instead have the array of points contained within the Fusion Table record that governs other attributes of the marker. The following method works correctly:
var path = [new google.maps.LatLng(46.2932212,-122.8215887),new google.maps.LatLng(46.2937995,-122.8194726)];
var polyline = new google.maps.Polyline({path: path, strokeColor: "#CDCDCD", strokeOpacity: 0, icons:[lineIcon2],strokeWeight: 2});
polyline.setMap(map);
In my Fusion Table, I have a column 'path2' (formatted as text) which contains the same value as the 'path' variable above:
[new google.maps.LatLng(46.2932212,-122.8215887),new google.maps.LatLng(46.2937995,-122.8194726)]
I then updated the code:
var path = path2;
var polyline = new google.maps.Polyline({path: path, strokeColor: "#CDCDCD", strokeOpacity: 0, icons:[lineIcon2],strokeWeight: 2});
polyline.setMap(map);
When the on-click event is triggered, I receive the error in console: " Invalid value for constructor parameter 0: [new google.maps.LatLng(46.2932212,-122.8215887),new google.maps.LatLng(46.2937995,-122.8194726)]"
This suggests that the value from the table is being brought in as I expected, but something has changed to make it error-out and I am not understanding what is occurring to the data when it is inserted to cause the error
(I know there are other, probably better, methods such as Fusion Table Layers, to achieve this polyline display, but would still like to understand this particular error scenario.)
Thank you for your suggestions!