maps-and-markers icon indicating copy to clipboard operation
maps-and-markers copied to clipboard

TypeError: undefined is not an object (evaluating 'respJson.routes[0].overview_polyline')

Open jiveRed opened this issue 5 years ago • 5 comments

Hi. First of all this map function is really great.

I've been following your tutorial on YouTube and tried running this in Android, but unfortunately I've got this error:

TypeError: undefined is not an object (evaluating 'respJson.routes[0].overview_polyline')

I already searched for solution but sadly, can't find any. Hope someone can help me. TIA

jiveRed avatar Oct 26 '19 18:10 jiveRed

Hi, could you solve this problem? I'm stuck with the same

FranciscoImanolSuarez avatar Dec 04 '19 01:12 FranciscoImanolSuarez

Make sure that u have a paid google api then console log to check if you’re getting the routes.

Sent from my iPhone

On 4 Dec 2019, at 9:16 AM, Francisco Imanol Suarez [email protected] wrote:

Hi, could you solve this problem? I'm stuck with the same

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

jiveRed avatar Dec 08 '19 15:12 jiveRed

Hi, its a problem with the naming convention.

import Polyline from '@mapbox/polyline';

from the import the second "L" is not a capital letter.

tosebikan avatar Jan 30 '20 08:01 tosebikan

Hi, its a problem with the naming convention. import Polyline from '@mapbox/polyline'; from the import the second "L" is not a capital letter.

I do not underestand your solution, could you please rephrase it more clearly?

RawazKayani avatar Feb 26 '20 18:02 RawazKayani

Also having this same issue and I have 'import Polyline from @mapbox/polyline' and still got this error

louiswicks avatar Mar 23 '21 10:03 louiswicks