xkjyeah / vue-google-maps

Google maps component for vue with 2-way data binding
https://xkjyeah.github.io/vue-google-maps/
1.88k stars 474 forks source link

gmap-polyline is not working #766

Open intellicogno opened 3 years ago

intellicogno commented 3 years ago

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' }"

`

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

`

AndryKwiatow commented 3 years ago

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

intellicogno commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

Thank you @AndryKwiatow for the clarification.