Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gmap-polyline is not working #766

Open
intellicogno opened this issue Feb 4, 2021 · 4 comments
Open

gmap-polyline is not working #766

intellicogno opened this issue Feb 4, 2021 · 4 comments

Comments

@intellicogno
Copy link

Hi Team,

I am trying to create a polyline using vue2-google-maps package.
The polygon feature is working fine but the polyline is not working. Here is the code:

Working polygon code:
<gmap-polygon :paths="paths" :options="{ strokeColor: '#ff0000ff' }" ></gmap-polygon>

Non working plotline code:
<gmap-polyline :paths="paths" :options="{ strokeColor: '#ff0000ff' }" ></gmap-polyline>

@AndryKwiatow
Copy link

Could you give more info about your paths variable for polyline?

@intellicogno
Copy link
Author

this.paths.push({ lat: this.routeMap[i].latitude, lng: this.routeMap[i].longitude, });
Strange thing is when I change <gmap-polyline **:paths**="paths" :options="{ strokeColor: '#ff0000ff' }" ></gmap-polyline> to <gmap-polyline **:path**="paths" :options="{ strokeColor: '#ff0000ff' }" ></gmap-polyline> it seems working.
Anyway, routeMap is a JSON that has latitude and longitude parameters.

@AndryKwiatow
Copy link

Hey, just checking by. I'm not a former contributor, but I'm working with this project, I just found into documentation that the correct prop path not paths
Here you can check out all the props you can use for this elements is don't think this may be consider as a problem, let me know if I can be any help.

image

@intellicogno
Copy link
Author

Thank you @AndryKwiatow for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants