I am passing long/lat coordinates in an array (coords2) to Googles Direction Services to return points on a map. When using the development server (localhost) all works great with JSON data for multiple point returned as expected from the request. But when on the production server (https). I am getting the error: "InvalidValueError: in property origin: not a string; and not a LatLng or LatLngLiteral: in property lng: not a number; and unknown property Lng"
I was getting the same error on development server until I converted each point to a number using parseFloat.
coords2['lat'] = parseFloat(point[0]);
coords2['lng'] = parseFloat(point[1]);
This corrected the error on localhost and all was well until the move to production.
Any help would be appreciated.