Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

234
Views
TypeError: AWS.Location no es un constructor

Estoy escribiendo un código para obtener una ruta entre dos puntos desde "Ubicación de AWS". Mi problema es que AWS no encuentra "Ubicación", pero "Ubicación" está en la documentación.

 async function ruteador() { await credentials.getPromise(); var params = { "DeparturePosition": [-122.7565,49.0021], "DestinationPosition": [-122.3394, 47.6159], "DistanceUnit": "Miles", } var location = new AWS.Location({region: AWS.config.region}); location.calculateRoute(params, function(err, data) { if (err) console.log(err, err.stack); // an error occurred else console.log(data); // successful response }); }

También cuando obtengo CognitoCredentials, "nuevo AWS.Cognito..." funciona

 const credentials = new AWS.CognitoIdentityCredentials({ IdentityPoolId: identityPoolId, });

documentación de aws: https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Location.html https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Location.html#calculateRoute-property

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!