-1

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.

Joseph Cho
  • 4,033
  • 4
  • 26
  • 33
JCG31
  • 1

1 Answers1

0

"OVER_QUERY_LIMIT"

Trying to get the code down to where it could be useful to the discussion here was a useful task in itself. With it stripped down to its basic nothing-can-be-wrong level, and still resulting in the error forced me to look elsewhere. It didn't occur me that we could have exceeded our request limit, which was creating the error.

JCG31
  • 1